Skip to content

Commit

Permalink
Melhorias diversas (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock authored Sep 21, 2024
2 parents 7a82e58 + 7d0aa3c commit 5672ba3
Show file tree
Hide file tree
Showing 113 changed files with 2,463 additions and 2,565 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
time: "12:00"
timezone: "America/Sao_Paulo"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "12:00"
timezone: "America/Sao_Paulo"
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Upload

on:
push:
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
check-latest: true
cache: 'gradle'
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
- name: Build with Gradle
uses: gradle/[email protected]
with:
arguments: build
- name: Upload Plugin
uses: actions/[email protected]
with:
name: CrazyCrates
path: jars/paper/*.jar
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
## Additions:
* Added the ability to override the menu button functionality to use your own menu through DeluxeMenus and any other gui plugin.
* The config options have been automatically added to your config.yml and default to false, They can be found where you edit what the menu button looks like.

* Added the ability to override the menu button functionality to use your own menu through DeluxeMenus and any other gui
plugin.
* The config options have been automatically added to your config.yml and default to false, They can be found where
you edit what the menu button looks like.

## Enhancements:
* Re-did how /crate admin handles giving keys, It expands the size of the inventory to 54 slots and adds a button at the bottom explaining how to get keys.
* At the same time, This fixed an issue where the lore of the keys given were different. Will it be paginated? Someday

* Re-did how /crate admin handles giving keys, It expands the size of the inventory to 54 slots and adds a button at the
bottom explaining how to get keys.
* At the same time, This fixed an issue where the lore of the keys given were different. Will it be paginated?
Someday

## Other:

* [Feature Requests](https://github.com/Crazy-Crew/CrazyCrates/issues)
* [Bug Reports](https://github.com/Crazy-Crew/CrazyCrates/issues)
47 changes: 30 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
# Contributing to CrazyCrates

Contributions to the project are always welcome, Pull Requests do have some guidelines before being approved.

## You should always create the fork as a personal repository not in an organization.
Any pull request made by a fork in an organization prevents modifications. Everyone has their own way of doing things and rather asking you to change that. A personal fork lets us change the things
that we have a tick about.

If you do not use a personal fork, We have to manually merge your pull request which means it's marked as closed instead of merged.
Any pull request made by a fork in an organization prevents modifications. Everyone has their own way of doing things
and rather asking you to change that. A personal fork lets us change the things
that we have a tick about.

If you do not use a personal fork, We have to manually merge your pull request which means it's marked as closed instead
of merged.

## Requirements
* `git`
* Java 17 ( Adoptium is recommended )

* `git`
* Java 17 ( Adoptium is recommended )

Pull Requests must be labeled properly according to if it's a bug fix, a new feature or enhancements to the code base.
* `git checkout -b fix/your_fix`
* `git checkout -b feature/your_feature`
* `git checkout -b quality/your_enhancement`
* Commit your changes using `git commit -m 'your commit'`
* Push to your branch using `git push`
* Open a pull request to the `main` branch on our repository to add your change.

You must explain what your pull request is changing and if needed, Supply a video of your change as Pull Requests are a way to get feedback.
* `git checkout -b fix/your_fix`
* `git checkout -b feature/your_feature`
* `git checkout -b quality/your_enhancement`
* Commit your changes using `git commit -m 'your commit'`
* Push to your branch using `git push`
* Open a pull request to the `main` branch on our repository to add your change.

You must explain what your pull request is changing and if needed, Supply a video of your change as Pull Requests are a
way to get feedback.

## Api Additions
Additions to our API are much more delicate as they can directly impact end users much more than adding a new feature or fixing a bug.

Adding new methods is perfectly fine as it won't break current plugins depending on our plugin. Replacing methods is also fine as long as you keep the old around but deprecated.
Additions to our API are much more delicate as they can directly impact end users much more than adding a new feature or
fixing a bug.

Adding new methods is perfectly fine as it won't break current plugins depending on our plugin. Replacing methods is
also fine as long as you keep the old around but deprecated.

Under no circumstance is existing methods suppose to have a change to the variables in the methods. You can change
anything inside the method.

Under no circumstance is existing methods suppose to have a change to the variables in the methods. You can change anything inside the method.
* i.e. UUID cannot become Player in `getKeys`, You should create a new method and deprecate the old one.
* i.e. UUID cannot become Player in `getKeys`, You should create a new method and deprecate the old one.

If trying to expose internal hashmap's or arraylists using the API, It is best instead of directly returning the hashmap or arraylist. You return an unmodifiable version or clone them.
If trying to expose internal hashmap's or arraylists using the API, It is best instead of directly returning the hashmap
or arraylist. You return an unmodifiable version or clone them.
All internals should be accessed through proper means rather than just allowing anyone to cripple the plugin.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,24 @@
</details>

### Resource Page

[![Hangar](https://raw.githubusercontent.com/intergrav/devins-badges/v3/assets/compact/available/hangar_46h.png)](https://hangar.papermc.io/CrazyCrew/CrazyCrates)
[![Modrinth](https://raw.githubusercontent.com/intergrav/devins-badges/v3/assets/compact/available/modrinth_46h.png)](https://modrinth.com/user/plugin/crazycrates)

## Getting Started

How to get started with contributing / maintaining your own version of CrazyCrates!

### Prerequisites

A list of things necessary to make sure you can build CrazyCrates properly.

* Intellij IDEA
* > https://www.jetbrains.com/idea/download/
* Gradle

### Installation

1. Clone the repo
```sh
git clone https://github.com/Crazy-Crew/CrazyCrates.git
Expand All @@ -72,30 +77,44 @@ A list of things necessary to make sure you can build CrazyCrates properly.
```

## Roadmap
Check our public [trello board](https://trello.com/b/bzQ5TwXo) for our current plans, any bugs and general tracking of the project progress.

Check our public [trello board](https://trello.com/b/bzQ5TwXo) for our current plans, any bugs and general tracking of
the project progress.

## Contributing

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/yourfeature`)
3. Commit your Changes (`git commit -m 'your amazing feature.'`)
4. Push to the Branch (`git push`)
5. Open a Pull Request to the `main` branch to add your feature/fix.

## License

Distributed under the MIT License. See [`LICENSE`](/LICENSE) for more information.

[discord-shield]: https://img.shields.io/discord/182615261403283459.svg?style=flat&logo=appveyor

[discord-url]: https://discord.gg/badbones-s-live-chat-182615261403283459

[contributors-shield]: https://img.shields.io/github/contributors/Crazy-Crew/CrazyCrates.svg?style=flat&logo=appveyor

[contributors-url]: https://github.com/Crazy-Crew/CrazyCrates/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/Crazy-Crew/CrazyCrates.svg?style=flat&logo=appveyor

[forks-url]: https://github.com/Crazy-Crew/CrazyCrates/network/members

[stars-shield]: https://img.shields.io/github/stars/Crazy-Crew/CrazyCrates.svg?style=flat&logo=appveyor

[stars-url]: https://github.com/Crazy-Crew/CrazyCrates/stargazers

[issues-shield]: https://img.shields.io/github/issues/Crazy-Crew/CrazyCrates.svg?style=flat&logo=appveyor

[issues-url]: https://github.com/Crazy-Crew/CrazyCrates/issues

[license-shield]: https://img.shields.io/github/license/Crazy-Crew/CrazyCrates.svg?style=flat&logo=appveyor

[license-url]: https://github.com/Crazy-Crew/CrazyCrates/blob/master/LICENSE

[codefactor-shield]: https://img.shields.io/codefactor/grade/github/crazy-crew/crazycrates/main?style=flat&logo=appveyor
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ public class CrazyCratesService {

private static ICrazyCrates plugin = null;

/**
* Prevents creating an instance of this class.
*/
@ApiStatus.Internal
private CrazyCratesService() {
throw new UnsupportedOperationException("This class cannot be instantiated");
}

/**
* Fetches the instance of the interface for api use.
*
Expand All @@ -28,14 +36,6 @@ public class CrazyCratesService {
return plugin;
}

/**
* Prevents creating an instance of this class.
*/
@ApiStatus.Internal
private CrazyCratesService() {
throw new UnsupportedOperationException("This class cannot be instantiated");
}

/**
* Creates the static instance of ICrazyCrates
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public enum CrateType {
* Definitely going to war over what you win.
*/
war("War");

private final String name;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* @version 0.3
*/
public enum KeyType {

physical_key("physical_key"),
virtual_key("virtual_key"),
free_key("free_key");

private final String name;

/**
Expand Down
Loading

0 comments on commit 5672ba3

Please sign in to comment.