Skip to content

Commit 9a6f89c

Browse files
Tigerpanzer02version-bump[github-action]
andauthored
#patch Back to stability 2.0 (#64)
* Bump version from 1.3.15 to 1.3.15-SNAPSHOT0 * Attempt to fix incompatibles with other plugins which using scriptengine by rewritting name of own scriptengine * Bump version from 1.3.15-SNAPSHOT0 to 1.3.15-SNAPSHOT1 * Fixed sending of leave message only into arena for active players * Added (3) new ConfigOptions for ArmorStands to control them in a better way e.g. for bb ingame stuff * Bump version from 1.3.15-SNAPSHOT1 to 1.3.15-SNAPSHOT2 * Fixed player collissions on spectator mode * Bump version from 1.3.15-SNAPSHOT2 to 1.3.15-SNAPSHOT3 * Fixed spectator can't fly after sneaking out of first person mode * Fixed arena start time divider did not match from config.yml * Bump version from 1.3.15-SNAPSHOT3 to 1.3.15-SNAPSHOT4 * Add some note about Shutdown-When-Game-Ends mysql * Updated CHANGELOG.md * Bump version from 1.3.15-SNAPSHOT4 to 1.3.15-SNAPSHOT5 --------- Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com>
1 parent aa799dd commit 9a6f89c

File tree

14 files changed

+84
-11
lines changed

14 files changed

+84
-11
lines changed

.github/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
### (1.3.11-)1.3.15 Release (17.02.2025)
2+
* Added 1.21.1-4 support
3+
* Added (3) new ConfigOptions for ArmorStands (BLOCK_IN_GAME_ARMOR_STAND_DESTROY, BLOCK_IN_GAME_ARMOR_STAND_CHECK, BLOCK_IN_GAME_ARMOR_STAND_INTERACT)
4+
* Fixed arena start time divider did not match from config.yml
5+
* Fixed spectator can't fly after sneaking out of first person mode
6+
* Fixed player collissions on spectator mode
7+
* Fixed sending of leave message for leaving player and the counting in arena
8+
* Fixed ActionBars did not convert player and arena placeholders by default
9+
* Fixed compatibility for BannerColoring in 1.20+
10+
* Fixed sign updates as cached objects got overwrite (#59)
11+
* Fixed CommandArgument could have multiple permissions while only the first one was checked
12+
* Changed onDisable process to make sure all data gets saved even on mysql
13+
* Changed Simplified and fixed getting of custom texture Skulls (1.20+)
14+
* Changed Simplified and fixed ArenaWallSign on 1.20.5+
15+
* Changed Attempt to fix incompatibles with other plugins which using scriptengine by rewritting name of own scriptengine [Changed ScriptEngine name to "plugilyprojects"]
16+
117
### 1.3.10 Release (09.07.2024)
218
* Fixed multiverse teleportation problems on a multiworld server
319

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/PluginArenaManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ public void leaveAttempt(@NotNull Player player, @NotNull IPluginArena arena) {
249249
PluginArenaUtils.resetPlayerAfterGame(arena, player);
250250
if(!user.isSpectator()) {
251251
new MessageBuilder(MessageBuilder.ActionType.LEAVE).arena(arena).player(player).sendArena();
252+
new MessageBuilder(MessageBuilder.ActionType.LEAVE).arena(arena).player(player).sendPlayer();
252253
}
253254
plugin.getSignManager().updateSigns();
254255
plugin.getDebugger().debug("[{0}] Final leave attempt for {1} took {2}ms", arena.getId(), player.getName(), System.currentTimeMillis() - start);

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/PluginArenaUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public static CompletableFuture<Void> preparePlayerForGame(
111111
plugin
112112
.getSpecialItemManager()
113113
.addSpecialItemsOfStage(player, SpecialItem.DisplayStage.SPECTATOR);
114+
VersionUtils.setCollidable(player, false);
114115
} else {
115116
player.setAllowFlight(false);
116117
player.setFlying(false);

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/states/PluginRestartingState.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public void handleCall(PluginArena arena) {
6161
arena.getMapRestorerManager().fullyRestoreArena();
6262
if(plugin.getConfigPreferences().getOption("BUNGEEMODE")) {
6363
if(ConfigUtils.getConfig(plugin, "bungee").getBoolean("Shutdown-When-Game-Ends")) {
64+
// If someone else reports issues on mysql data save, may update to run sync save of allstatistic!
65+
// (e.g. the data is now entered correctly in the DB, but only if "Shutdown-When-Game-Ends: false" is set in the bungee.yml, otherwise no data is entered in the database)
6466
for(Player player : Bukkit.getOnlinePlayers()) {
6567
IUser user = plugin.getUserManager().getUser(player);
6668
plugin.getUserManager().saveAllStatistic(user);

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/states/PluginStartingState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void handleCall(PluginArena arena) {
6161

6262
int timer = arena.getTimer();
6363

64-
double startWaiting = plugin.getConfig().getDouble("Starting-Waiting-Time", 60);
64+
double startWaiting = plugin.getConfig().getDouble("Time-Manager.Waiting", 60);
6565
arena.getBossbarManager().setProgress(timer / startWaiting);
6666

6767
float exp = (float) (timer / startWaiting);

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/events/Events.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ public void onHangingBreakEvent(HangingBreakByEntityEvent event) {
224224

225225
@EventHandler(priority = EventPriority.HIGH)
226226
public void onArmorStandDestroy(EntityDamageByEntityEvent event) {
227+
if(!plugin.getConfigPreferences().getOption("BLOCK_IN_GAME_ARMOR_STAND_DESTROY")) {
228+
return;
229+
}
227230
if(!(event.getEntity() instanceof LivingEntity)) {
228231
return;
229232
}
@@ -232,10 +235,22 @@ public void onArmorStandDestroy(EntityDamageByEntityEvent event) {
232235
return;
233236
}
234237
if(event.getDamager() instanceof Player && plugin.getArenaRegistry().isInArena((Player) event.getDamager())) {
238+
if(plugin.getConfigPreferences().getOption("BLOCK_IN_GAME_ARMOR_STAND_CHECK")) {
239+
IPluginArena arena = plugin.getArenaRegistry().getArena((Player) event.getDamager());
240+
if(arena != null && arena.getArenaState() != IArenaState.IN_GAME) {
241+
return;
242+
}
243+
}
235244
event.setCancelled(true);
236245
} else if(event.getDamager() instanceof Projectile) {
237246
Projectile projectile = (Projectile) event.getDamager();
238247
if(projectile.getShooter() instanceof Player && plugin.getArenaRegistry().isInArena((Player) projectile.getShooter())) {
248+
if(plugin.getConfigPreferences().getOption("BLOCK_IN_GAME_ARMOR_STAND_CHECK")) {
249+
IPluginArena arena = plugin.getArenaRegistry().getArena((Player) projectile.getShooter());
250+
if(arena != null && arena.getArenaState() != IArenaState.IN_GAME) {
251+
return;
252+
}
253+
}
239254
event.setCancelled(true);
240255
return;
241256
}
@@ -245,9 +260,19 @@ public void onArmorStandDestroy(EntityDamageByEntityEvent event) {
245260

246261
@EventHandler(priority = EventPriority.HIGH)
247262
public void onInteractWithArmorStand(PlayerArmorStandManipulateEvent event) {
248-
if(plugin.getArenaRegistry().isInArena(event.getPlayer())) {
249-
event.setCancelled(true);
263+
if(!plugin.getConfigPreferences().getOption("BLOCK_IN_GAME_ARMOR_STAND_INTERACT")) {
264+
return;
265+
}
266+
if(!plugin.getArenaRegistry().isInArena(event.getPlayer())) {
267+
return;
250268
}
269+
if(plugin.getConfigPreferences().getOption("BLOCK_IN_GAME_ARMOR_STAND_CHECK")) {
270+
IPluginArena arena = plugin.getArenaRegistry().getArena(event.getPlayer());
271+
if(arena != null && arena.getArenaState() != IArenaState.IN_GAME) {
272+
return;
273+
}
274+
}
275+
event.setCancelled(true);
251276
}
252277

253278

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/events/spectator/settings/SpectatorSettingsMenu.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import plugily.projects.minigamesbox.api.arena.IPluginArena;
3434
import plugily.projects.minigamesbox.api.user.IUser;
3535
import plugily.projects.minigamesbox.classic.PluginMain;
36+
import plugily.projects.minigamesbox.classic.handlers.items.SpecialItem;
3637
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
3738
import plugily.projects.minigamesbox.classic.handlers.reward.Reward;
3839
import plugily.projects.minigamesbox.classic.handlers.reward.RewardType;
@@ -263,6 +264,9 @@ public void onPlayerSneak(PlayerToggleSneakEvent event) {
263264
firstPersonMode.remove(player);
264265
player.setSpectatorTarget(null);
265266
player.setGameMode(GameMode.SURVIVAL);
267+
player.setAllowFlight(true);
268+
player.setFlying(true);
269+
VersionUtils.setCollidable(player, false);
266270
}
267271

268272
public NormalFastInv getInventory() {

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/handlers/language/LanguageMigrator.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
public class LanguageMigrator {
4545

4646
public enum CoreFileVersion {
47-
/*ARENA_SELECTOR(0),*/ ARENAS(1), BUNGEE(1), CONFIG(4), KITS(2),
47+
/*ARENA_SELECTOR(0),*/ ARENAS(1), BUNGEE(1), CONFIG(5), KITS(2),
4848
LANGUAGE(2), /*LEADERBOARDS(0),*/ MYSQL(1), PERMISSIONS(1), POWERUPS(1),
4949
REWARDS(1), /*SIGNS(0),*/ SPECIAL_ITEMS(1), SPECTATOR(1)/*, STATS(0)*/;
5050

@@ -165,6 +165,17 @@ private void executeUpdate(File file, CoreFileVersion coreFileVersion, int versi
165165
MigratorUtils.removeLineFromFile(file, " True: false");
166166
MigratorUtils.insertAfterLine(file, "Damage:", " Hunger: false");
167167
break;
168+
case 4:
169+
MigratorUtils.insertAfterLine(file, " Item-Move: true", " ArmorStand: \n" +
170+
" # Should we block armor stand destroy with double click?\n" +
171+
" Destroy: true\n" +
172+
" # Should we block armor stand interaction?\n" +
173+
" Interact: true\n" +
174+
" # Should these only be blocked while ingame and arena state is in_game? (e.g. Lobby and Ending is blocked)\n" +
175+
" # Setting it to false means on all stages of the game the event will be cancelled. \n" +
176+
" # Setting it to true means only while IN_GAME the event will be cancelled.\n" +
177+
" Check: true\r\n");
178+
break;
168179
default:
169180
break;
170181
}

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/preferences/ConfigOption.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ public class ConfigOption implements IConfigOption {
4545
//Commands.Shorter
4646
options.put("BLOCK_IN_GAME_COMMANDS", new ConfigOption("Block.In-Game.Commands", true, true));
4747
options.put("BLOCK_IN_GAME_ITEM_MOVE", new ConfigOption("Block.In-Game.Item-Move", true, true));
48+
options.put("BLOCK_IN_GAME_ARMOR_STAND_DESTROY", new ConfigOption("Block.In-Game.ArmorStand.Destroy", true, true));
49+
options.put("BLOCK_IN_GAME_ARMOR_STAND_INTERACT", new ConfigOption("Block.In-Game.ArmorStand.Interact", true, true));
50+
options.put("BLOCK_IN_GAME_ARMOR_STAND_CHECK", new ConfigOption("Block.In-Game.ArmorStand.Check", true, true));
4851
options.put("DATABASE", new ConfigOption("Database", false, true));
4952
options.put("REWARDS", new ConfigOption("Rewards", false, true));
5053
options.put("PLUGIN_CHAT_FORMAT", new ConfigOption("Chat.Format", true, true));

MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/utils/engine/JavaScriptEngine.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
public class JavaScriptEngine {
1717

18-
private List<String> engineNames = new ArrayList<>(Arrays.asList("js", "JS", "javascript", "JavaScript", "ecmascript", "ECMAScript", "nashorn", "Nashorn"));
18+
// private List<String> engineNames = new ArrayList<>(Arrays.asList("js", "JS", "javascript", "JavaScript", "ecmascript", "ECMAScript", "nashorn", "Nashorn"));
19+
private List<String> engineNames = new ArrayList<>(Arrays.asList("plugilyprojects"));
1920
private ScriptEngineManager scriptEngineManager;
2021
private ScriptEngineFactory scriptEngineFactory;
2122

0 commit comments

Comments
 (0)