-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed many bugs in BuildBattle plugin (#86)
* Updated plugin.yml to prevent invalid file error on startup * Changed version of dependency MiniGamesBox to circumvent build issues * Fixed error in time change menu * Fixed issue with %player% placeholder (should be lowercase) * Bump version from 5.0.7-SNAPSHOT1 to 5.0.8 * Fixed problem in place rewards * Cancelled BlockExplodeEvent to prevent blocks such as Respawn Anchor explode and damage the arena. * Fixed BuildBattle menu item not working because API was used at 2 different places. Added bb menu command and used registerSpecialItem to fix. * Disabled enderpearl throwing while in arena because it allows to teleport to other players plots or outside the arena map, even during voting stage. * Changed back version number of MiniGamesBox to 1.3.10 * Fixed small error if non-player threw projectile. --------- Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com>
- Loading branch information
1 parent
575040b
commit 6259422
Showing
13 changed files
with
113 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/plugily/projects/buildbattle/commands/arguments/game/MenuArgument.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* | ||
* BuildBattle - Ultimate building competition minigame | ||
* Copyright (C) 2022 Plugily Projects - maintained by Tigerpanzer_02 and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
package plugily.projects.buildbattle.commands.arguments.game; | ||
|
||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.entity.Player; | ||
import plugily.projects.buildbattle.arena.BaseArena; | ||
import plugily.projects.buildbattle.commands.arguments.ArgumentsRegistry; | ||
import plugily.projects.minigamesbox.api.arena.IArenaState; | ||
import plugily.projects.minigamesbox.classic.commands.arguments.data.CommandArgument; | ||
|
||
/** | ||
* @author Tigerpanzer_02 | ||
* <p> | ||
* Created at 27.12.2020 | ||
*/ | ||
public class MenuArgument { | ||
|
||
public MenuArgument(ArgumentsRegistry registry) { | ||
registry.mapArgument("buildbattle", new CommandArgument("menu", "", CommandArgument.ExecutorType.PLAYER) { | ||
@Override | ||
public void execute(CommandSender sender, String[] args) { | ||
Player player = (Player) sender; | ||
BaseArena arena = (BaseArena) registry.getPlugin().getArenaRegistry().getArena(player); | ||
|
||
if(arena != null && (arena.getArenaState() == IArenaState.IN_GAME)) | ||
arena.getPlugin().getOptionsRegistry().getOptionsGui().open(player); | ||
} | ||
}); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters