Compare commits

...
2 Commits
Author SHA1 Message Date
version-bump[github-action] 26c961bb88 Bump version from 5.1.1-SNAPSHOT2 to 5.1.2 2025-07-22 19:40:41 +00:00
Tigerpanzer_02andversion-bump[github-action] 7ade50fd23 #patch 5.1.2 Fixed InventoryView and Vehicles (#110)
* Bump version from 5.1.1 to 5.1.1-SNAPSHOT0

* Fixed vehicle moving outside of arena plots and other worlds!

* Fixed InventoryView not interface onItemMove

* Fixed Method 'org.bukkit.block.banner.PatternType[] org.bukkit.block.banner.PatternType.values()' must be Methodref constant

* Fixed InventoryView not interface on getGui @VoteMenu

* Bump version from 5.1.1-SNAPSHOT0 to 5.1.1-SNAPSHOT1

* Updated CHANGELOG.md

* Bump version from 5.1.1-SNAPSHOT1 to 5.1.1-SNAPSHOT2

---------

Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com>
2025-07-22 21:40:10 +02:00
5 changed files with 20 additions and 10 deletions

No files matched your search

+6
View File
@@ -10,6 +10,12 @@ 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
+1 -1
View File
@@ -26,7 +26,7 @@
<groupId>plugily.projects</groupId>
<artifactId>buildbattle</artifactId>
<version>5.1.1</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;
}
}
}
@@ -662,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);
}
}
@@ -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);
}
});