Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 1.20.3 & 4 #77

Merged
merged 11 commits into from
Dec 31, 2023
21 changes: 21 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@ deploy webhooks to print changelog successfully

That's all, matcher will stop when detects next line started with `###` match

### 5.0.2 Release (31.12.2023)
* Fixed gtb round reset on player leave
* Fixed gtb "could not pass event AsyncPlayerChatEvent" if spectators ingame
* Fixed bouncing and mouse pointer reset on themevoting
* Added 1.20.3 & 1.20.4 support
* Updated to minigamesbox 1.3.4

### 5.0.1 Release (21.08.2023)
* Fixed rewards enabling
* Fixed bossbar disabling
* Fixed locale registration if service unavailable

### 5.0.0 Release (09.08.2023)
* Added up to 1.20 compatibility
* Changed arena solo and team to classic, with different team sizes
* Changed supported languages [https://translate.plugily.xyz]
* Changed plugin base is based on MinigamesCore [https://github.com/Plugily-Projects/MiniGamesBox]
* Changed native java building to java17, java 8 downloadable on our discord [https://discord.plugily.xyz]
* Fixed gtb mode issues
* Fixed all known bugs

### 4.5.3 Release (04.08.2021 - xx.xx.2021)

* Fixed when players didn't got rewards after plot reset
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ repositories {
}

dependencies {
implementation("plugily.projects:MiniGamesBox-Classic:1.3.2") { isTransitive = false }
implementation("plugily.projects:MiniGamesBox-Classic:1.3.4") { isTransitive = false }
compileOnly("org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT")
compileOnly("net.citizensnpcs:citizensapi:2.0.31-SNAPSHOT")
compileOnly("org.jetbrains:annotations:24.0.1")
}

group = "plugily.projects"
version = "5.0.0"
version = "5.0.1-SNAPSHOT5"
description = "BuildBattle"

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ public void onGTBGuessChat(AsyncPlayerChatEvent event) {
if(arena.getArenaState() != ArenaState.IN_GAME) {
return;
}
if(arena.getSpectators().contains(player)) {
return;
}
GuessArena gameArena = (GuessArena) arena;
if(gameArena.getWhoGuessed().contains(player)) {
event.setCancelled(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void leaveAttempt(@NotNull Player player, @NotNull PluginArena arena) {
if(plot.getMembers().isEmpty()) {
if(arena.getArenaState() == ArenaState.IN_GAME) {
//ToDo message force skipped
pluginArena.setTimer(plugin.getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".Round-Delay"));
pluginArena.setTimer(plugin.getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".Round-Delay"), true);
pluginArena.setArenaInGameState(BaseArena.ArenaInGameState.PLOT_VOTING);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,53 +100,30 @@ public void teleportToPlots() {
continue;
}

if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_13_R2)) { // Async catch in old versions
// Should do this in async thread to do not cause dead for the main thread
CompletableFuture.supplyAsync(() -> {
Location loc = tploc;
int m = 0;
while(loc.getBlock().getType() != Material.AIR) {
if(m >= 500) {
break;// Thread never ends on flat map?
if(arena.getArenaInGameState() != BaseArena.ArenaInGameState.THEME_VOTING) {
break; // Thread never ends on flat map?
}

if(arena.getArenaState() == ArenaState.IN_GAME && arena.getTimer() > 30) {
break;
}

loc = loc.add(0, 1, 0);
//teleporting 1 x and z block away from center cause Y is above plot limit
if(loc.getY() >= cuboid.getMaxPoint().getY()) {
loc = cuboid.getCenter().clone().add(1, 0, 1);
}

m++; // Preventing server froze on flat map
}

return loc;
}).thenAccept(loc -> {
for(Player player : buildPlot.getMembers()) {
VersionUtils.teleport(player, cuboid.getCenter());
VersionUtils.teleport(player, loc);
//Fix respawning bug while theme voting
Bukkit.getScheduler().runTaskLater(arena.getPlugin(), () -> {
player.setAllowFlight(true);
player.setFlying(true);
}, 40);
}
} else {
// Should do this in async thread to do not cause dead for the main thread
CompletableFuture.supplyAsync(() -> {
Location loc = tploc;
while(loc.getBlock().getType() != Material.AIR) {
if(arena.getArenaState() == ArenaState.IN_GAME && arena.getTimer() > 30) {
break; // Thread never ends on flat map?
}

loc = loc.add(0, 1, 0);
//teleporting 1 x and z block away from center cause Y is above plot limit
if(loc.getY() >= cuboid.getMaxPoint().getY()) {
loc = cuboid.getCenter().clone().add(1, 0, 1);
}
}

return loc;
}).thenAccept(loc -> {
for(Player player : buildPlot.getMembers()) {
VersionUtils.teleport(player, cuboid.getCenter());
}
});
}
});
}
Bukkit.getPluginManager().callEvent(new PlotPlayerReceiveEvent(arena, buildPlot));
}
Expand Down
12 changes: 8 additions & 4 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ Rewards: true
Plugin-Chat-Format: true


# Should we enable a separate arena chat for players inside a arena
# Useful on multi arena servers that don't want the same chat for all players on the server
Separate-Arena-Chat: true
Chat:
Separate:
# Should we enable a separate arena chat for players inside a arena
# Useful on multi arena servers that don't want the same chat for all players on the server
Arena: true
# Should spectators only write with other spectators
Spectators: true


# Should we fire some cool fireworks at locations of every player at special events such as the game end?
Expand Down Expand Up @@ -271,4 +275,4 @@ Update-Notifier:
# You edited it, huh? Next time hurt yourself!
Do-Not-Edit:
File-Version: 1
Core-Version: 1
Core-Version: 2