mirror of
https://github.com/Plugily-Projects/BuildBattle.git
synced 2026-11-05 09:00:14 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26c961bb88 | ||
|
|
7ade50fd23 | ||
|
|
bd12269dc9 | ||
|
|
3142f28258 |
No files matched your search
@@ -10,6 +10,16 @@ deploy webhooks to print changelog successfully
|
||||
|
||||
That's all, matcher will stop when detects next line started with `###` match
|
||||
|
||||
### 5.1.2 Release
|
||||
* Fixed InventoryView not interface on getGui @VoteMenu
|
||||
* Fixed Method 'org.bukkit.block.banner.PatternType[] org.bukkit.block.banner.PatternType.values()' must be Methodref constant
|
||||
* Fixed InventoryView not interface onItemMove
|
||||
* Fixed vehicle moving outside of arena plots and other worlds
|
||||
|
||||
### 5.1.1 Release
|
||||
* Fixed liquid flow outside plots and different worlds
|
||||
* Fixed forceplay console command without theme
|
||||
|
||||
### 5.1.0 Release (10.07.2025)
|
||||
* Added Heads from HeadDatabase (selected on each server start 200 per category)
|
||||
* Added Heads Search function
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<groupId>plugily.projects</groupId>
|
||||
<artifactId>buildbattle</artifactId>
|
||||
<version>5.1.0</version>
|
||||
<version>5.1.2</version>
|
||||
<name>BuildBattle</name>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -55,6 +55,7 @@ import plugily.projects.minigamesbox.classic.utils.version.events.api.PlugilyPla
|
||||
import plugily.projects.minigamesbox.classic.utils.version.events.api.PlugilyPlayerPickupArrow;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XEntityType;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.inventory.XInventoryView;
|
||||
|
||||
/**
|
||||
* @author Plajer
|
||||
@@ -296,8 +297,6 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
}
|
||||
}
|
||||
|
||||
//TODO recognise plot by location should be added, as current check will go through all plots...
|
||||
//Alternative use filter!!
|
||||
@EventHandler
|
||||
public void onVehicleMove(VehicleMoveEvent event) {
|
||||
Vehicle vehicle = event.getVehicle();
|
||||
@@ -306,13 +305,14 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
continue;
|
||||
}
|
||||
for(Plot buildPlot : ((BaseArena) arena).getPlotManager().getPlots()) {
|
||||
if(buildPlot.getCuboid() != null && !buildPlot.getCuboid().isIn(event.getTo())) {
|
||||
if(buildPlot.getCuboid() != null && buildPlot.getCuboid().isIn(event.getFrom()) && !buildPlot.getCuboid().isInWithMarge(event.getTo(), 1)) {
|
||||
vehicle.setVelocity(vehicle.getVelocity().zero());
|
||||
if(vehicle.getType() == XEntityType.MINECART.get()) {
|
||||
((Minecart) vehicle).setMaxSpeed(0);
|
||||
} else {
|
||||
vehicle.remove();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -329,6 +329,7 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
for(Plot buildPlot : ((BaseArena) arena).getPlotManager().getPlots()) {
|
||||
if(buildPlot.getCuboid() != null && buildPlot.getCuboid().isInWithMarge(blockLocation, 5)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -346,6 +347,7 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
for(Block block : event.getBlocks()) {
|
||||
if(buildPlot.getCuboid() != null && !buildPlot.getCuboid().isInWithMarge(block.getLocation(), -1) && buildPlot.getCuboid().isIn(blockLocation)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -596,11 +598,14 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
continue;
|
||||
}
|
||||
for(Plot buildPlot : ((BaseArena) arena).getPlotManager().getPlots()) {
|
||||
if(buildPlot.getTeleportLocation().getWorld() != toBlock.getWorld()) {
|
||||
continue;
|
||||
}
|
||||
if(buildPlot.getCuboid() != null) {
|
||||
if(!buildPlot.getCuboid().isIn(toBlock) && buildPlot.getCuboid().isIn(blockLoc)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
if(!buildPlot.getCuboid().isIn(toBlock)) {
|
||||
if(!buildPlot.getCuboid().isInWithMarge(toBlock, -1) && buildPlot.getCuboid().isIn(toBlock)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
@@ -659,8 +664,8 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
|
||||
if(baseArena != null && baseArena.getArenaState() != IArenaState.IN_GAME) {
|
||||
if(event.getClickedInventory() == humanEntity.getInventory()) {
|
||||
if(event.getView().getType() == InventoryType.CRAFTING
|
||||
|| event.getView().getType() == InventoryType.PLAYER) {
|
||||
if(XInventoryView.of(event.getView()).getType() == InventoryType.CRAFTING
|
||||
|| XInventoryView.of(event.getView()).getType() == InventoryType.PLAYER) {
|
||||
event.setResult(Event.Result.DENY);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-7
@@ -48,29 +48,33 @@ public class ForcePlayArgument {
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if(args.length == 1) {
|
||||
//todo translatable
|
||||
new MessageBuilder("&cPlease type arena theme!").prefix().send(sender);
|
||||
return;
|
||||
}
|
||||
BaseArena arena;
|
||||
int themeArgStart = 1;
|
||||
if(!(sender instanceof Player)) {
|
||||
if(args.length == 2) {
|
||||
//todo translatable
|
||||
new MessageBuilder("&cPlease type arena name!").prefix().send(sender);
|
||||
arena = (BaseArena) registry.getPlugin().getArenaRegistry().getArena(args[1]);
|
||||
if(args.length == 2 && arena != null) {
|
||||
BaseArena finalArena = arena;
|
||||
Bukkit.getOnlinePlayers().forEach(player -> {
|
||||
registry.getPlugin().getArenaManager().joinAttempt(player, finalArena);
|
||||
});
|
||||
arena.setForceStart(true);
|
||||
return;
|
||||
}
|
||||
arena = (BaseArena) registry.getPlugin().getArenaRegistry().getArena(args[1]);
|
||||
themeArgStart = 2;
|
||||
} else {
|
||||
arena = (BaseArena) registry.getPlugin().getArenaRegistry().getArena((Player) sender);
|
||||
if(arena == null) {
|
||||
arena = (BaseArena) registry.getPlugin().getArenaRegistry().getArena(args[1]);
|
||||
}
|
||||
}
|
||||
if(arena == null) {
|
||||
new MessageBuilder("COMMANDS_NOT_PLAYING").asKey().send(sender);
|
||||
return;
|
||||
}
|
||||
if(!(arena instanceof BuildArena)) {
|
||||
//todo translatable
|
||||
new MessageBuilder("&cCan't set theme on this arena type!").prefix().send(sender);
|
||||
return;
|
||||
}
|
||||
@@ -83,8 +87,9 @@ public class ForcePlayArgument {
|
||||
new MessageBuilder("COMMANDS_THEME_BLACKLISTED").asKey().prefix().send(sender);
|
||||
return;
|
||||
}
|
||||
BaseArena finalArena1 = arena;
|
||||
Bukkit.getOnlinePlayers().forEach(player -> {
|
||||
registry.getPlugin().getArenaManager().joinAttempt(player, arena);
|
||||
registry.getPlugin().getArenaManager().joinAttempt(player, finalArena1);
|
||||
});
|
||||
arena.setForceStart(true);
|
||||
arena.setTheme(themeName.toString());
|
||||
|
||||
+4
-3
@@ -34,6 +34,7 @@ import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.ServerVersion;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XPatternType;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.SimpleClickableItem;
|
||||
import plugily.projects.minigamesbox.inventory.normal.NormalFastInv;
|
||||
|
||||
@@ -104,17 +105,17 @@ public class BannerMenu {
|
||||
private void prepareLayerStageGui() {
|
||||
NormalFastInv gui = new NormalFastInv(54, new MessageBuilder("MENU_OPTION_CONTENT_BANNER_INVENTORY_LAYER").asKey().build());
|
||||
|
||||
for(PatternType pattern : PatternType.values()) {
|
||||
for(XPatternType pattern : XPatternType.getValues()) {
|
||||
ItemStack item = banner.buildBanner();
|
||||
BannerMeta meta = (BannerMeta) item.getItemMeta();
|
||||
DyeColor color = banner.getColor() == DyeColor.BLACK ? DyeColor.WHITE : DyeColor.BLACK;
|
||||
|
||||
meta.addPattern(new Pattern(color, pattern));
|
||||
meta.addPattern(new Pattern(color, pattern.get()));
|
||||
item.setItemMeta(meta);
|
||||
|
||||
gui.addItem(new SimpleClickableItem(item, event -> {
|
||||
event.setCancelled(true);
|
||||
banner.addPattern(new BannerPattern(color, pattern));
|
||||
banner.addPattern(new BannerPattern(color, pattern.get()));
|
||||
new BannerMenu(player, banner).openInventory(PatternStage.LAYER_COLOR);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XEnchantment;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XItemFlag;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
|
||||
import plugily.projects.minigamesbox.classic.utils.version.xseries.inventory.XInventoryView;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.ClickableItem;
|
||||
import plugily.projects.minigamesbox.inventory.common.item.SimpleClickableItem;
|
||||
import plugily.projects.minigamesbox.inventory.normal.NormalFastInv;
|
||||
@@ -103,7 +104,7 @@ public class VoteMenu {
|
||||
HumanEntity humanEntity = event.getPlayer();
|
||||
Inventory inventory = event.getInventory();
|
||||
|
||||
if(humanEntity.getOpenInventory().getTopInventory() != inventory) {
|
||||
if(XInventoryView.of(humanEntity.getOpenInventory()).getTopInventory() != inventory) {
|
||||
humanEntity.openInventory(inventory);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user