Compare commits

...
22 Commits
Author SHA1 Message Date
version-bump[github-action] ca42285076 Bump version from 5.0.12-SNAPSHOT1 to 5.0.13 2025-02-18 19:38:40 +00:00
Tigerpanzer_02andversion-bump[github-action] b2dbb5adaf #patch Fixed Progress must be between 0 and 1 (#96)
* Bump version from 5.0.12 to 5.0.12-SNAPSHOT0

* Fixed Progress must be between 0 and 1

* Bump version from 5.0.12-SNAPSHOT0 to 5.0.12-SNAPSHOT1

---------

Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com>
2025-02-18 20:37:52 +01:00
version-bump[github-action] 67f27359e8 Bump version from 5.0.11-SNAPSHOT4 to 5.0.12 2025-02-17 21:23:55 +00:00
Tigerpanzer_02andversion-bump[github-action] 6ff5236241 #patch Back to stability 2.0 (#95)
* Bump version from 5.0.11 to 5.0.11-SNAPSHOT0

* Fixed a bug on gtb where players were getting points for guess even when they wrote the theme on chat when it was already shown by the plugin

* Updated config to match core version 5

* Fixed block destroy drops

* Fixed gtb Arena CleanUp which results in first round issues at selection of theme etc.

* Fixed gtb options menu is not showing up for every builder

* Fixed gtb plot reset

* Bump version from 5.0.11-SNAPSHOT0 to 5.0.11-SNAPSHOT1

* Updated MiniGamesBox

* Bump version from 5.0.11-SNAPSHOT1 to 5.0.11-SNAPSHOT2

* Fixed ItemSpawn on Plotarea also for dropped items by not player related drops

* Bump version from 5.0.11-SNAPSHOT2 to 5.0.11-SNAPSHOT3

* Fixed players are collidable on normal made

* Updated CHANGELOG.md

* Updated CHANGELOG.md

* Bump version from 5.0.11-SNAPSHOT3 to 5.0.11-SNAPSHOT4

---------

Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com>
2025-02-17 22:23:08 +01:00
Tigerpanzer_02 7d0157a3ce Update deploy-master.yml 2025-02-12 19:13:48 +01:00
Tigerpanzer_02 c5b204f12d Update deploy-development.yml 2025-02-12 19:13:17 +01:00
Tigerpanzer_02 e7303d7b5d Fixed spectator counts on gtb guess 2025-01-27 23:17:35 +01:00
Tigerpanzer_02 3b6871bdfb Fixed bba settheme not working, now works
if executed in lobby: skip voting when game starts
and allow executing it all the time after game started so admin can change theme anytime
2025-01-27 23:14:33 +01:00
Tigerpanzer_02 4a00729153 Misc changed stained glass pane naming to ??? 2025-01-27 22:27:29 +01:00
Tigerpanzer_02 acc6d9bea4 Fixed PlayerHeads on 1.20+ 2025-01-27 22:26:58 +01:00
Tigerpanzer_02 8dc6ece9f7 Fixed clearing of dropped items on 1.21+ 2025-01-27 22:26:24 +01:00
Tigerpanzer_02 52013964be Added notice for Mob.Spawn that it also contains Armour Stands 2025-01-27 22:24:24 +01:00
Tigerpanzer_02 1566119559 Updated Gradle 2025-01-27 22:24:06 +01:00
Tigerpanzer_02 c1bdf92925 Fixed Biomes on 1.21 2025-01-27 22:23:34 +01:00
Tigerpanzer_02 588e6fb0f3 Fixed Banner Building on 1.20+ 2025-01-27 22:23:16 +01:00
Tigerpanzer_02 4257e7ba53 Fixed Creature Spawning outside plots in same world 2025-01-27 22:12:57 +01:00
version-bump[github-action] 4305660bff Bump version from 5.0.10-SNAPSHOT1 to 5.0.11 2024-07-12 23:49:14 +00:00
Tigerpanzer_02andversion-bump[github-action] 2beeb74559 #patch Fixed 1.20.6 & 1.21 (#89)
* Bump version from 5.0.10 to 5.0.10-SNAPSHOT0

* Changed ServerVersion as 1.20.6+ removed package nms

* Bump version from 5.0.10-SNAPSHOT0 to 5.0.10-SNAPSHOT1

---------

Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com>
2024-07-13 01:48:22 +02:00
version-bump[github-action] 66e556003e Bump version from 5.0.9-SNAPSHOT1 to 5.0.10 2024-07-10 23:15:17 +00:00
Tigerpanzer_02andversion-bump[github-action] a3e590ce07 #patch Fixed a plugin crash on none paperspigot software servers (#88)
* Bump version from 5.0.9 to 5.0.9-SNAPSHOT0

* Updated to minigamesbox 1.3.12

* Bump version from 5.0.9-SNAPSHOT0 to 5.0.9-SNAPSHOT1

---------

Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com>
2024-07-11 01:14:21 +02:00
version-bump[github-action] a81d21d4ec Bump version from 5.0.8-SNAPSHOT2 to 5.0.9 2024-07-09 20:13:37 +00:00
bc575c26d2 #patch Fixed several issues (#87)
Special thanks to https://github.com/Waterman1001

* Bump version from 5.0.7-SNAPSHOT1 to 5.0.8

* 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>

* Bump version from 5.0.8 to 5.0.8-SNAPSHOT0

* fix: fixed ChunkManager.sendMapChunk

* Bump version from 5.0.8-SNAPSHOT0 to 5.0.8-SNAPSHOT1

* Updated to minigamesbox 1.3.11

* Bump version from 5.0.8-SNAPSHOT1 to 5.0.8-SNAPSHOT2

* Update CHANGELOG.md

---------

Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com>
Co-authored-by: Onno <emailodg@gmail.com>
Co-authored-by: Lagggpixel <lagggpixel@gmail.com>
2024-07-09 22:12:43 +02:00
33 changed files with 300 additions and 176 deletions

No files matched your search

+39 -1
View File
@@ -10,6 +10,44 @@ deploy webhooks to print changelog successfully
That's all, matcher will stop when detects next line started with `###` match
### 5.0.13 Release (18.02.2025)
* Fixed Progress must be between 0 and 1
### 5.0.12 Release (17.02.2025)
* Fixed ItemSpawn on Plotarea also for dropped items by not player related drops
* Fixed gtb plot reset
* Fixed gtb Arena CleanUp which results in first round issues at selection of theme etc.
* Fixed gtb options menu is not showing up for every builder
* Fixed block destroy drops
* Fixed a bug on gtb where players were getting points for guess even when they wrote the theme on chat when it was already shown by the plugin
* Fixed spectator counts on gtb guess
* Fixed bba settheme command
* Fixed PlayerHeads on 1.20+
* Fixed clearing of dropped items on 1.21+
* Fixed Biomes on 1.21
* Fixed Banner Building on 1.20+
* Fixed Creature Spawning outside plots in same world
* Fixed players are collidable on normal mode
* Changed stained glass pane naming to ???
* Updated to minigamesbox 1.3.16
### 5.0.9 Release (09.07.2024)
* Updated to minigamesbox 1.3.11
* Fixed ChunkManager.sendMapChunk
* Fixed error in time change menu
* Fixed issue with %player% placeholder (should be lowercase)
* Fixed problem in place rewards
* Fixed small error if non-player threw projectile.
* Added Cancel of BlockExplodeEvent to prevent blocks such as Respawn Anchor explode and damage the arena
* Added Disabled enderpearl throwing while in arena because it allows to teleport to other players plots or outside the arena map, even during voting stage.
### 5.0.8 Release (25.06.2024)
* Updated to minigamesbox 1.3.9
### 5.0.7 Release (18.06.2024)
* API update
### 5.0.6 Release (24.04.2024)
* Updated to minigamesbox 1.3.8
@@ -630,4 +668,4 @@ it will have BEDROCK value if absent
### 3.0.0 Release (14.05.2018 - 01.06.2018)
* Add everything here
* Add everything here
+5 -5
View File
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest Commit
uses: actions/checkout@v4.1.3
uses: actions/checkout@v4.2.2
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Bump Version
@@ -25,14 +25,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest Commit
uses: actions/checkout@v4.1.3
uses: actions/checkout@v4.2.2
with:
ref: 'development'
- name: Set up JDK
uses: actions/setup-java@v4.2.1
uses: actions/setup-java@v4.6.0
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
@@ -40,4 +40,4 @@ jobs:
run: ./gradlew publishMavenPublicationToSnapshotsRepository
env:
MAVEN_USERNAME: ${{ secrets.SNAPSHOTSUSERNAME }}
MAVEN_PASSWORD: ${{ secrets.SNAPSHOTSPASSWORD }}
MAVEN_PASSWORD: ${{ secrets.SNAPSHOTSPASSWORD }}
+5 -5
View File
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest Commit
uses: actions/checkout@v4.1.3
uses: actions/checkout@v4.2.2
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Bump Version
@@ -28,14 +28,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest Commit
uses: actions/checkout@v4.1.3
uses: actions/checkout@v4.2.2
with:
ref: 'master'
- name: Set up JDK
uses: actions/setup-java@v4.2.1
uses: actions/setup-java@v4.6.0
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
@@ -43,4 +43,4 @@ jobs:
run: ./gradlew publishMavenPublicationToReleasesRepository
env:
MAVEN_USERNAME: ${{ secrets.RELEASESUSERNAME }}
MAVEN_PASSWORD: ${{ secrets.RELEASESPASSWORD }}
MAVEN_PASSWORD: ${{ secrets.RELEASESPASSWORD }}
+8 -6
View File
@@ -22,7 +22,7 @@
plugins {
id("signing")
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.1"
id ("com.gradleup.shadow") version "9.0.0-beta5"
java
}
@@ -31,7 +31,10 @@ repositories {
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://oss.sonatype.org/content/repositories/central")
maven(uri("https://papermc.io/repo/repository/maven-public/"))
maven {
name = "papermc"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven(uri("https://maven.plugily.xyz/releases"))
maven(uri("https://maven.plugily.xyz/snapshots"))
maven(uri("https://repo.citizensnpcs.co/"))
@@ -39,15 +42,14 @@ repositories {
}
dependencies {
implementation("plugily.projects:MiniGamesBox-Classic:1.3.10") { isTransitive = false }
compileOnly("org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
implementation("plugily.projects:MiniGamesBox-Classic:1.3.16-SNAPSHOT1") { isTransitive = false }
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
compileOnly("net.citizensnpcs:citizensapi:2.0.31-SNAPSHOT")
compileOnly("org.jetbrains:annotations:24.0.1")
}
group = "plugily.projects"
version = "5.0.8"
version = "5.0.13"
description = "BuildBattle"
java {
+2 -21
View File
@@ -1,26 +1,7 @@
#
#
# 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/>.
#
#
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
@@ -32,7 +32,6 @@ import org.bukkit.event.EventPriority;
import org.bukkit.event.block.*;
import org.bukkit.event.entity.*;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerBucketEmptyEvent;
@@ -84,11 +83,35 @@ public class ArenaEvents extends PluginArenaEvents {
if(buildPlot != null && buildPlot.getCuboid() != null && buildPlot.getCuboid().isIn(event.getBlock().getLocation())) {
plugin.getUserManager().getUser(event.getPlayer()).adjustStatistic("BLOCKS_BROKEN", 1);
if(event.isDropItems()) {
event.getBlock().getDrops().clear();
}
return;
}
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.HIGH)
public void onItemSpawn(ItemSpawnEvent event) {
if (!plugin.getArenaRegistry().getArenaWorlds().contains(event.getLocation().getWorld())) {
return;
}
plugin.getArenaRegistry().getArenas().forEach(arena -> {
if(!(arena instanceof BaseArena)) {
return;
}
if(((BaseArena) arena).getArenaInGameState() != BaseArena.ArenaInGameState.BUILD_TIME || plugin.getBlacklistManager().getItemList().contains(event.getEntity().getItemStack().getType())) {
return;
}
for(Plot buildPlot : ((BaseArena) arena).getPlotManager().getPlots()) {
if(buildPlot.getCuboid() != null && buildPlot.getCuboid().isInWithMarge(event.getLocation(), 1)) {
event.setCancelled(true);
}
}
});
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlace(BlockPlaceEvent event) {
BaseArena arena = plugin.getArenaRegistry().getArena(event.getPlayer());
@@ -189,7 +212,7 @@ public class ArenaEvents extends PluginArenaEvents {
if(playerPlot != null) {
// Prevent "Legacy material support initialisation"
playerPlot.changeFloor(material, ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1) ? hand.getData().getData() : 0);
playerPlot.changeFloor(material, ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12) ? hand.getData().getData() : 0);
new MessageBuilder("MENU_OPTION_CONTENT_FLOOR_CHANGED").asKey().player(event.getPlayer()).sendPlayer();
}
}
@@ -317,13 +340,13 @@ public class ArenaEvents extends PluginArenaEvents {
continue;
}
if(event.getEntity().getType() == EntityType.WITHER || !plugin.getConfigPreferences().getOption("MOB_SPAWN")) {
event.setCancelled(true);
return;
}
for(Plot plot : baseArena.getPlotManager().getPlots()) {
if(plot.getCuboid() != null && plot.getCuboid().isInWithMarge(entityLoc, 1)) {
if(!plugin.getConfigPreferences().getOption("MOB_SPAWN")) {
event.setCancelled(true);
return;
}
if(plot.getEntities() >= maxMobPerPlot) {
plot.getMembers().forEach(player -> new MessageBuilder("IN_GAME_MESSAGES_PLOT_LIMIT_ENTITIES").asKey().arena(arena).player(player).sendPlayer());
event.setCancelled(true);
@@ -340,7 +363,7 @@ public class ArenaEvents extends PluginArenaEvents {
plot.addEntity();
event.setCancelled(false);
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_9_R1)) {
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_9)) {
event.getEntity().setAI(false);
}
}
@@ -412,12 +435,11 @@ public class ArenaEvents extends PluginArenaEvents {
if(arena == null || arena.getArenaState() != IArenaState.IN_GAME) {
return;
}
if(event.getEntity().getType() != EntityType.PLAYER) {
return;
}
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.HIGH)
public void onDamage(EntityDamageEvent event) {
if(event.getEntity().getType() != EntityType.PLAYER) {
@@ -468,6 +490,36 @@ public class ArenaEvents extends PluginArenaEvents {
}
}
@EventHandler
public void onOtherBlockExplode(BlockExplodeEvent event) {
Location blockLocation = event.getBlock().getLocation();
for(IPluginArena arena : plugin.getArenaRegistry().getArenas()) {
if(!(arena instanceof BaseArena)) {
continue;
}
for(Plot buildPlot : ((BaseArena) arena).getPlotManager().getPlots()) {
if(buildPlot.getCuboid() != null && buildPlot.getCuboid().isInWithMarge(blockLocation, 5)) {
event.blockList().clear();
event.setCancelled(true);
}
}
}
}
@EventHandler
public void onEnderpearlThrow(ProjectileLaunchEvent event) {
if(event.getEntity().getShooter() instanceof Player) {
BaseArena arena = plugin.getArenaRegistry().getArena((Player) event.getEntity().getShooter());
if (arena == null || arena.getArenaState() != IArenaState.IN_GAME) {
return;
}
if (event.getEntity() instanceof EnderPearl) {
event.setCancelled(true);
}
}
}
@EventHandler
public void onWaterFlowEvent(BlockFromToEvent event) {
Location toBlock = event.getToBlock().getLocation();
@@ -532,15 +584,6 @@ public class ArenaEvents extends PluginArenaEvents {
}
}
@EventHandler
public void onInventoryClose(InventoryCloseEvent event) {
Player player = (Player) event.getPlayer();
BaseArena baseArena = plugin.getArenaRegistry().getArena(player);
if(baseArena != null && baseArena.getArenaInGameState() == BaseArena.ArenaInGameState.BUILD_TIME) {
baseArena.addMenuItem(player);
}
}
@EventHandler
public void onItemMove(InventoryClickEvent event) {
HumanEntity humanEntity = event.getWhoClicked();
@@ -569,6 +612,9 @@ public class ArenaEvents extends PluginArenaEvents {
if(arena.getArenaState() != IArenaState.IN_GAME) {
return;
}
if(arena.getArenaInGameState() != BaseArena.ArenaInGameState.BUILD_TIME) {
return;
}
if(arena.getSpectators().contains(player)) {
return;
}
@@ -119,7 +119,7 @@ public class ArenaRegistry extends PluginArenaRegistry {
World minWorld = minPoint.getWorld();
if(minWorld != null) {
Biome biome = ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15_R1) ?
Biome biome = ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15) ?
minWorld.getBiome(minPoint.getBlockX(), minPoint.getBlockY(), minPoint.getBlockZ())
: minWorld.getBiome(minPoint.getBlockX(), minPoint.getBlockZ());
@@ -53,7 +53,7 @@ public class BaseArena extends PluginArena {
private final List<Player> spectators = new ArrayList<>();
private MapRestorerManager mapRestorerManager;
private final PlotManager plotManager;
private String theme = "Theme";
private String theme = null;
protected ParticleRefreshScheduler particleRefreshScheduler;
private ArenaType arenaType;
@@ -153,8 +153,8 @@ public class BaseArena extends PluginArena {
return theme;
}
public void setTheme(String theme) {
this.theme = theme == null ? "Theme" : theme;
public void setTheme(String arenaTheme) {
this.theme = arenaTheme;
}
public void sendBuildLeftTimeMessage() {
@@ -217,33 +217,6 @@ public class BaseArena extends PluginArena {
}
}
HandlerItem optionsMenuItem;
private HandlerItem getMenuItem() {
if(optionsMenuItem == null) {
HandlerItem optionsMenu = new HandlerItem(getPlugin().getOptionsRegistry().getMenuItem());
optionsMenu.setLeftClick(true);
optionsMenu.setRightClick(true);
optionsMenu.addInteractHandler(event -> {
event.setCancelled(true);
getPlugin().getOptionsRegistry().getOptionsGui().open(event.getPlayer());
});
optionsMenu.addInventoryClickHandler(event -> {
getPlugin().getOptionsRegistry().getOptionsGui().open(event.getWhoClicked());
});
optionsMenuItem = optionsMenu.build();
}
return optionsMenuItem;
}
public void addMenuItem(Player player) {
if(player.getInventory().contains(getMenuItem().getItemStack())) {
return;
}
player.getInventory().setItem(8, getMenuItem().getItemStack());
}
public PlotManager getPlotManager() {
return plotManager;
}
@@ -68,9 +68,8 @@ public class GuessArena extends BaseArena {
@Override
public void cleanUpArena() {
currentTheme = null;
resetBuildPlot();
round = 1;
whoGuessed.clear();
removedCharsAt.clear();
playedPlots.clear();
playedThemes.clear();
super.cleanUpArena();
@@ -138,10 +137,10 @@ public class GuessArena extends BaseArena {
if(buildPlot != null) {
buildPlot.resetPlot();
}
getRemovedCharsAt().clear();
removedCharsAt.clear();
setBuildPlot(null);
setCurrentTheme(null);
getWhoGuessed().clear();
whoGuessed.clear();
round += 1;
getPlayers().forEach(player -> getPlugin().getActionBarManager().clearActionBarsFromPlayer(player));
}
@@ -183,7 +182,7 @@ public class GuessArena extends BaseArena {
}
//-1 because builder can´t guess
if(whoGuessed.size() >= getPlayers().size() - 1) {
if(whoGuessed.size() >= getPlayersLeft().size() - 1) {
setTimer(getPlugin().getConfig().getInt("Time-Manager." + getArenaType().getPrefix() + ".Round-Delay"));
setArenaInGameState(ArenaInGameState.PLOT_VOTING);
@@ -220,7 +220,7 @@ public class Plot {
}
for(Chunk chunk : cuboid.chunkList()) {
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15_R1)) {
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15)) {
chunk.getWorld().refreshChunk(chunk.getX(), chunk.getZ());
continue;
}
@@ -235,7 +235,7 @@ public class Plot {
changeFloor(defaultFloor.parseMaterial());
if(centerWorld != null) {
if(ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15_R1)) {
if(ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15)) {
Location min = cuboid.getMinPoint();
Location max = cuboid.getMaxPoint();
@@ -307,7 +307,7 @@ public class Plot {
Block block = maxWorld.getBlockAt(x, y, z);
block.setType(material);
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1)) {
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12)) {
try {
Block.class.getMethod("setData", byte.class).invoke(block, data);
} catch(Exception e) {
@@ -119,7 +119,7 @@ public class PlotManager {
Bukkit.getScheduler().runTaskLater(arena.getPlugin(), () -> {
player.setAllowFlight(true);
player.setFlying(true);
}, 40);
}, 2);
}
});
}
@@ -52,21 +52,21 @@ public class InGameState extends PluginInGameState {
}
switch(pluginArena.getArenaInGameState()) {
case THEME_VOTING:
if(arena.getTimer() <= 0) {
if(arena.getTimer() <= 0 || pluginArena.getTheme() != null) {
// may consider start to build message...
pluginArena.setArenaInGameState(BaseArena.ArenaInGameState.BUILD_TIME);
setArenaTimer(getPlugin().getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".In-Game"));
if(pluginArena.getVotePoll() != null && pluginArena.getTheme().equals("Theme")) {
if(pluginArena.getVotePoll() != null && pluginArena.getTheme() == null) {
pluginArena.setTheme(pluginArena.getVotePoll().getVotedTheme());
new MessageBuilder("IN_GAME_MESSAGES_PLOT_GTB_THEME_NAME").asKey().arena(pluginArena).sendArena();
}
for(Player player : pluginArena.getPlayers()) {
player.closeInventory();
pluginArena.addMenuItem(player);
player.setGameMode(GameMode.CREATIVE);
VersionUtils.setCollidable(player, false);
}
} else {
handleThemeVoting(pluginArena);
@@ -103,8 +103,8 @@ public class InGameState extends PluginInGameState {
adjustStatistics(pluginArena);
pluginArena.teleportToWinnerPlot();
pluginArena.executeEndRewards();
getPlugin().getArenaManager().stopGame(false, arena);
pluginArena.executeEndRewards();
} else {
voteForNextPlot(pluginArena);
}
@@ -71,8 +71,10 @@ public class InGameState extends PluginInGameState {
new MessageBuilder("IN_GAME_MESSAGES_PLOT_GTB_ROUND").asKey().integer(pluginArena.getRound()).arena(pluginArena).sendArena();
new TitleBuilder("IN_GAME_MESSAGES_PLOT_GTB_THEME_GUESS_TITLE").asKey().arena(pluginArena).sendArena();
Bukkit.getScheduler().runTaskLater(getPlugin(), () -> pluginArena.getCurrentBuilders().forEach(player -> player.setGameMode(GameMode.CREATIVE)), 40);
pluginArena.getCurrentBuilders().forEach(pluginArena::addMenuItem);
Bukkit.getScheduler().runTaskLater(getPlugin(), () -> pluginArena.getCurrentBuilders().forEach(player -> {
player.setGameMode(GameMode.CREATIVE);
pluginArena.getPlugin().getSpecialItemManager().getSpecialItem("OPTIONS_MENU").setItem(player);
} ), 40);
setArenaTimer(getPlugin().getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".In-Game"));
pluginArena.setArenaInGameState(BaseArena.ArenaInGameState.BUILD_TIME);
@@ -109,9 +111,7 @@ public class InGameState extends PluginInGameState {
pluginArena.teleportToWinnerPlot(); //todo save built plot from winner
pluginArena.executeEndRewards();
getPlugin().getArenaManager().stopGame(false, arena);
}
//round delay
if(arena.getTimer() <= 0) {
} else if (arena.getTimer() <= 0) {
pluginArena.resetBuildPlot();
setArenaTimer(getPlugin().getConfig().getInt("Time-Manager." + pluginArena.getArenaType().getPrefix() + ".Voting.Theme"));
pluginArena.setArenaInGameState(BaseArena.ArenaInGameState.THEME_VOTING);
@@ -93,7 +93,7 @@ public class AdditionalValueInitializer {
rewardsFactory.registerRewardType("VOTE", new RewardType("voted"));
rewardsFactory.registerRewardType("VOTE_ALL", new RewardType("voted-all"));
rewardsFactory.registerRewardType("REPORT", new RewardType("report"));
rewardsFactory.registerRewardType("PLACE", new RewardType("place"));
rewardsFactory.registerRewardType("PLACE", new RewardType("place", RewardType.ExecutorType.NUMBER, false));
}
private void registerSpecialItems() {
@@ -74,7 +74,7 @@ public class PlaceholderInitializer {
return null;
}
String theme = pluginArena.getTheme();
if(theme.equalsIgnoreCase("theme")) {
if(theme == null) {
theme = new MessageBuilder("SCOREBOARD_THEME_UNKNOWN").asKey().build();
}
return theme;
@@ -30,6 +30,7 @@ import plugily.projects.buildbattle.commands.arguments.admin.plot.AddPlotArgumen
import plugily.projects.buildbattle.commands.arguments.admin.plot.RemovePlotArgument;
import plugily.projects.buildbattle.commands.arguments.admin.plot.SelectPlotArgument;
import plugily.projects.buildbattle.commands.arguments.game.GuessArgument;
import plugily.projects.buildbattle.commands.arguments.game.MenuArgument;
import plugily.projects.minigamesbox.api.arena.IPluginArena;
import plugily.projects.minigamesbox.classic.commands.arguments.PluginArgumentsRegistry;
@@ -50,6 +51,7 @@ public class ArgumentsRegistry extends PluginArgumentsRegistry {
new AddPlotArgument(this);
new RemovePlotArgument(this);
new SelectPlotArgument(this);
new MenuArgument(this);
new GuessArgument(this);
new ThemeArgument(this);
}
@@ -25,11 +25,14 @@ import org.bukkit.entity.Player;
import plugily.projects.buildbattle.arena.BaseArena;
import plugily.projects.buildbattle.arena.BuildArena;
import plugily.projects.buildbattle.commands.arguments.ArgumentsRegistry;
import plugily.projects.minigamesbox.api.arena.IArenaState;
import plugily.projects.minigamesbox.classic.commands.arguments.data.CommandArgument;
import plugily.projects.minigamesbox.classic.commands.arguments.data.LabelData;
import plugily.projects.minigamesbox.classic.commands.arguments.data.LabeledCommandArgument;
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
import java.util.StringJoiner;
/**
* @author Plajer
* <p>
@@ -58,15 +61,16 @@ public class SetThemeArgument {
new MessageBuilder("&cPlease type arena theme!").prefix().send(sender);
return;
}
if(arena.getArenaInGameState() == BaseArena.ArenaInGameState.THEME_VOTING) {
String themeName = args[1];
if(arena.getPlugin().getThemeManager().isThemeBlacklisted(themeName)) {
StringJoiner themeName = new StringJoiner(" ");
for(int i = 1; i < args.length; i++)
themeName.add(args[i]);
if(arena.getArenaInGameState() == BaseArena.ArenaInGameState.BUILD_TIME || arena.getArenaState() == IArenaState.STARTING) {
if(arena.getPlugin().getThemeManager().isThemeBlacklisted(themeName.toString())) {
new MessageBuilder("COMMANDS_THEME_BLACKLISTED").asKey().prefix().send(sender);
return;
}
arena.setTheme(themeName);
new MessageBuilder("IN_GAME_MESSAGES_ADMIN_CHANGED_THEME").asKey().prefix().value(themeName).arena(arena).sendArena();
arena.setTheme(themeName.toString());
new MessageBuilder("IN_GAME_MESSAGES_ADMIN_CHANGED_THEME").asKey().prefix().value(themeName.toString()).arena(arena).sendArena();
} else {
new MessageBuilder("&cWrong state to force theme!").prefix().send(sender);
}
@@ -57,6 +57,11 @@ public class GuessArgument {
GuessArena gameArena = (GuessArena) arena;
if(gameArena.getArenaInGameState() != BaseArena.ArenaInGameState.BUILD_TIME) {
new MessageBuilder("COMMANDS_NOT_PLAYING").asKey().player(player).sendPlayer();
return;
}
if(gameArena.getWhoGuessed().contains(player)) {
new MessageBuilder("IN_GAME_MESSAGES_PLOT_GTB_THEME_GUESS_CANT_TALK").asKey().arena(gameArena).player(player).sendPlayer();
return;
@@ -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);
}
});
}
}
@@ -33,6 +33,8 @@ import plugily.projects.buildbattle.handlers.menu.MenuOption;
import plugily.projects.buildbattle.handlers.menu.OptionsRegistry;
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.XEntityType;
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
/**
@@ -88,8 +90,9 @@ public class FloorChangeOption {
event.getCurrentItem().setType(Material.AIR);
player.closeInventory();
player.getNearbyEntities(5, 5, 5).stream().filter(entity -> entity.getType() == EntityType.DROPPED_ITEM)
.forEach(Entity::remove);
player.getNearbyEntities(5, 5, 5).stream().filter(entity -> entity.getType() == XEntityType.ITEM.get())
.forEach(Entity::remove);
}
});
}
@@ -67,8 +67,9 @@ public class TimeChangeOption {
return;
}
gui.addItem(new ItemBuilder(XMaterial.CLOCK.parseItem()).name(new MessageBuilder("MENU_OPTION_CONTENT_TIME_TYPE_WORLD").asKey().build()).lore(plot.getTime().name()).build());
//gui.addItem(new ItemBuilder(XMaterial.CLOCK.parseItem()).name(new MessageBuilder("MENU_OPTION_CONTENT_TIME_TYPE_WORLD").asKey().build()).lore(plot.getTime().name()).build());
addClockItem(gui, plot, "MENU_OPTION_CONTENT_TIME_TYPE_WORLD");
addClockItem(gui, plot, "MENU_OPTION_CONTENT_TIME_TYPE_DAY");
addClockItem(gui, plot, "MENU_OPTION_CONTENT_TIME_TYPE_NOON");
addClockItem(gui, plot, "MENU_OPTION_CONTENT_TIME_TYPE_SUNSET");
@@ -21,10 +21,12 @@
package plugily.projects.buildbattle.handlers.menu.registry.banner;
import org.bukkit.DyeColor;
import org.bukkit.block.BlockState;
import org.bukkit.block.banner.Pattern;
import org.bukkit.block.banner.PatternType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BannerMeta;
import org.bukkit.inventory.meta.BlockStateMeta;
import plugily.projects.minigamesbox.classic.utils.version.ServerVersion;
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
@@ -66,8 +68,14 @@ public class Banner {
ItemStack item = XMaterial.WHITE_BANNER.parseItem();
BannerMeta meta = (BannerMeta) item.getItemMeta();
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1)) {
meta.setBaseColor(color);
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12)) {
BlockStateMeta bsm = (BlockStateMeta) meta;
BlockState state = ((BlockStateMeta) meta).getBlockState();
if (state instanceof org.bukkit.block.Banner) {
((org.bukkit.block.Banner) state).setBaseColor(color);
state.update(true);
}
bsm.setBlockState(state);
}
for(BannerPattern pattern : patterns) {
@@ -21,11 +21,13 @@
package plugily.projects.buildbattle.handlers.menu.registry.banner;
import org.bukkit.DyeColor;
import org.bukkit.block.BlockState;
import org.bukkit.block.banner.Pattern;
import org.bukkit.block.banner.PatternType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BannerMeta;
import org.bukkit.inventory.meta.BlockStateMeta;
import org.bukkit.plugin.java.JavaPlugin;
import plugily.projects.buildbattle.Main;
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
@@ -69,11 +71,17 @@ public class BannerMenu {
for(DyeColor color : DyeColor.values()) {
ItemStack item;
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1)) {
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12)) {
item = XMaterial.WHITE_BANNER.parseItem();
BannerMeta meta = (BannerMeta) item.getItemMeta();
meta.setBaseColor(color);
BlockStateMeta bsm = (BlockStateMeta) meta;
BlockState state = ((BlockStateMeta) meta).getBlockState();
if (state instanceof org.bukkit.block.Banner) {
((org.bukkit.block.Banner) state).setBaseColor(color);
state.update(true);
}
bsm.setBlockState(state);
item.setItemMeta(meta);
} else {
item = XMaterial.matchXMaterial(color.toString() + "_BANNER").orElse(XMaterial.WHITE_BANNER).parseItem();
@@ -88,7 +88,7 @@ public class BiomeChangeOption {
}
for(Chunk chunk : plot.getCuboid().chunkList()) {
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15_R1)) {
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15)) {
chunk.getWorld().refreshChunk(chunk.getX(), chunk.getZ());
continue;
}
@@ -64,7 +64,7 @@ public class BiomesRegistry {
.getString(biome + ".material-name", "bedrock").toUpperCase()).orElse(XMaterial.BEDROCK).parseItem())
.name(new MessageBuilder(config.getString(biome + ".displayname")).build())
.lore(lore)
.build(), config.getString(biome + ".permission"), XBiome.matchXBiome(biome).orElse(XBiome.BADLANDS));
.build(), config.getString(biome + ".permission"), XBiome.of(biome).orElse(XBiome.BADLANDS));
biomes.add(biomeItem);
i++;
}
@@ -27,7 +27,7 @@ import plugily.projects.buildbattle.handlers.menu.MenuOption;
import plugily.projects.buildbattle.handlers.menu.OptionsRegistry;
import plugily.projects.minigamesbox.classic.handlers.language.MessageBuilder;
import plugily.projects.minigamesbox.classic.utils.helper.ItemBuilder;
import plugily.projects.minigamesbox.classic.utils.helper.ItemUtils;
import plugily.projects.minigamesbox.classic.utils.version.xseries.XMaterial;
import plugily.projects.minigamesbox.inventory.common.item.SimpleClickableItem;
import plugily.projects.minigamesbox.inventory.normal.NormalFastInv;
@@ -39,7 +39,7 @@ import plugily.projects.minigamesbox.inventory.normal.NormalFastInv;
public class PlayerHeadsOption {
public PlayerHeadsOption(OptionsRegistry registry) {
registry.registerOption(new MenuOption(10, "PLAYER_HEADS", new ItemBuilder(ItemUtils.PLAYER_HEAD_ITEM.clone())
registry.registerOption(new MenuOption(10, "PLAYER_HEADS", new ItemBuilder(XMaterial.PLAYER_HEAD.parseItem())
.name(new MessageBuilder("MENU_OPTION_CONTENT_HEADS_ITEM_NAME").asKey().build())
.lore(new MessageBuilder("MENU_OPTION_CONTENT_HEADS_ITEM_LORE").asKey().build())
.build(), new MessageBuilder("MENU_OPTION_CONTENT_HEADS_INVENTORY").asKey().build()) {
@@ -37,26 +37,20 @@ public class ChunkManager {
private static Class<?> packetPlayOutMapChunk, chunkClass;
private static Constructor<?> mapChunkConstructor;
private static Method chunkHandleMethod;
static {
if(ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_18_R1)) {
if (ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_18)) {
packetPlayOutMapChunk = PacketUtils.classByName("net.minecraft.network.protocol.game", "PacketPlayOutMapChunk");
chunkClass = PacketUtils.classByName("net.minecraft.world.level.chunk", "Chunk");
try {
chunkHandleMethod = Chunk.class.getMethod("getHandle");
} catch(NoSuchMethodException exc) {
}
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17_R1)) {
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17)) {
try {
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(PacketUtils.classByName("net.minecraft.world.level.chunk", "LevelChunk"));
} catch(NoSuchMethodException e) {
} catch (NoSuchMethodException e) {
try {
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(chunkClass);
} catch(NoSuchMethodException ex) {
ex.printStackTrace();
} catch (NoSuchMethodException ex) {
throw new RuntimeException(ex);
}
}
}
@@ -64,38 +58,39 @@ public class ChunkManager {
}
public static void sendMapChunk(Player player, Chunk chunk) {
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_18_R1)) {
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_18)) {
return; // Should just use World#refreshChunk instead
}
try {
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17_R1)) {
Method chunkHandleMethod = chunk.getClass().getMethod("getHandle");
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17)) {
PacketUtils.sendPacket(player, mapChunkConstructor.newInstance(chunkHandleMethod.invoke(chunk)));
return;
}
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_16_R1)) {
if(mapChunkConstructor == null)
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_16)) {
if (mapChunkConstructor == null)
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(chunkClass, int.class, boolean.class);
PacketUtils.sendPacket(player, mapChunkConstructor.newInstance(chunkHandleMethod.invoke(chunk), 65535, false));
return;
}
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_10_R2)) {
if(mapChunkConstructor == null)
if (ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_10)) {
if (mapChunkConstructor == null)
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(chunkClass, boolean.class, int.class);
PacketUtils.sendPacket(player, mapChunkConstructor.newInstance(chunkHandleMethod.invoke(chunk), true, 65535));
return;
}
if(mapChunkConstructor == null)
if (mapChunkConstructor == null)
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(chunkClass, int.class);
PacketUtils.sendPacket(player, mapChunkConstructor.newInstance(chunkHandleMethod.invoke(chunk), 65535));
} catch(ReflectiveOperationException exception) {
exception.printStackTrace();
} catch (ReflectiveOperationException exception) {
throw new RuntimeException(exception);
}
}
@@ -183,7 +183,7 @@ public class VoteMenu {
ItemBuilder itemBuilder = new ItemBuilder(clickableSignItem.getItem()).removeLore();
itemBuilder.lore(new MessageBuilder("MENU_THEME_ITEM_LORE").asKey().arena(arena).value(theme).integer((int) percent).build().split(";"));
if(theme.equals(playerVote)) {
itemBuilder.enchantment(Enchantment.DAMAGE_ALL, 1).flags(ItemFlag.HIDE_ENCHANTS);
itemBuilder.enchantment(Enchantment.UNBREAKING, 1).flags(ItemFlag.HIDE_ENCHANTS);
} else {
itemBuilder.removeEnchants().removeFlags();
}
@@ -215,10 +215,10 @@ public class VoteMenu {
int slot = multiplied + 2 + j;
if(vote > percent) {
gui.setItem(slot, ClickableItem.of(new ItemBuilder(XMaterial.RED_STAINED_GLASS_PANE.parseItem()).name("").build()));
gui.setItem(slot, ClickableItem.of(new ItemBuilder(XMaterial.RED_STAINED_GLASS_PANE.parseItem()).name("???").build()));
continue;
}
gui.setItem(slot, ClickableItem.of(new ItemBuilder(XMaterial.LIME_STAINED_GLASS_PANE.parseItem()).name("").build()));
gui.setItem(slot, ClickableItem.of(new ItemBuilder(XMaterial.LIME_STAINED_GLASS_PANE.parseItem()).name("???").build()));
vote += 16.7;
}
}
+12 -3
View File
@@ -67,6 +67,15 @@ Block:
Leave: false
# Cancels Item Movement into player crafting, enchantment tables, anvils ...
Item-Move: true
ArmorStand:
# Should we block armor stand destroy with double click?
Destroy: true
# Should we block armor stand interaction?
Interact: true
# Should these only be blocked while ingame and arena state is in_game? (e.g. Lobby and Ending is blocked)
# Setting it to false means on all stages of the game the event will be cancelled.
# Setting it to true means only while IN_GAME the event will be cancelled.
Check: true
# Enable this option when you're using MySQL, otherwise it won't work.
@@ -191,8 +200,8 @@ Time-Manager:
Mob:
# Should mob spawning on arenas be enabled?
Spawn: false
# Should mob spawning on arenas be enabled? (Contains Armour Stands)
Spawn: true
# The list of restricted entities that can't be spawned in game
Restricted:
- wither
@@ -274,4 +283,4 @@ Update-Notifier:
# You edited it, huh? Next time hurt yourself!
Do-Not-Edit:
File-Version: 1
Core-Version: 4
Core-Version: 5
+1 -1
View File
@@ -393,7 +393,7 @@ Menu:
Noon: "Noon (6000 ticks)"
Sunset: "Sunset (12000 ticks)"
Night: "Night (13000 ticks)"
MidNight: "MidNight (18000 ticks)"
MidNight: "Midnight (18000 ticks)"
Sunrise: "Sunrise (23000 ticks)"
Changed: "%plugin_prefix% Time has been changed to %value%"
Biome:
+2 -2
View File
@@ -8,11 +8,11 @@ api-version: 1.13
commands:
buildbattle:
description: BuildBattle Commands
usage: "\u00A76Correct usage: /bb [option]"
usage: "§6Correct usage: /bb [option]"
aliases: [ bb, buildb ]
buildbattleadmin:
description: BuildBattle Admin Commands
usage: "\u00A76Correct usage: /bba [option]"
usage: "§6Correct usage: /bba [option]"
aliases: [ bba, buildbadmin ]
permissions:
+20 -20
View File
@@ -2,7 +2,7 @@
# BuildBattle rewards configuration
#
# Placeholders list:
# %PLAYER% - Current player name
# %player% - Current player name
# %MAPNAME% - Name of map
# %ARENA-ID% - BaseArena Identifier
# %PLACE% - Player Place (Working on category place)
@@ -17,11 +17,11 @@
# - chance(1):p:say I was very lucky! # Player has 1% chance to say "I was very lucky!"
# - p:chance(99):spawn # Player has 99% chance to teleport to spawn
# ^ YOU CAN EVEN SWAP CHANCE WITH PLAYER!
# - chance(50):eco give %PLAYER% 10 # Console has 10% chance to give player 10$
# - chance(50):eco give %player% 10 # Console has 10% chance to give player 10$
#
# You can unlock full potential of rewards using our script engine! (since 4.0.0)
# Just add example reward:
# - script:player.sendMessage("oh, hi %PLAYER%"); # It will send "oh, hi <player name>" to player! 100% plain java!
# - script:player.sendMessage("oh, hi %player%"); # It will send "oh, hi <player name>" to player! 100% plain java!
# - script:server.broadcastMessage("hello everyone"); # Broadcasts "hello everyone" to whole server
# - script:player.getInventory().addItem(new org.bukkit.inventory.ItemStack(org.bukkit.Material.DIRT));
# ^ Gives player dirt item (you must always use direct package names for not provided objects)
@@ -50,40 +50,40 @@ rewards:
# Commands performed when all themes are guessed in GTB
# Delete everything if you don't want to use this section
guess:
- eco give %PLAYER% 2
- eco give %player% 2
guess-all:
- eco give %PLAYER% 2
- eco give %player% 2
# Commands executed when someone vote
vote:
- eco give %PLAYER% 2
- chance(10):eco give %PLAYER% 8
- eco give %player% 2
- chance(10):eco give %player% 8
# Commands executed when all voted for a plot
vote-all:
- eco give %PLAYER% 2
- chance(10):eco give %PLAYER% 8
- eco give %player% 2
- chance(10):eco give %player% 8
# Commands executed when someone report a building
report:
- eco give %PLAYER% 2
- eco give %player% 2
- script:player.sendMessage("You reported the building");
# Commands executed on place X
place:
1:
- eco give %PLAYER% 10
- eco give %player% 10
2:
- eco give %PLAYER% 9
- eco give %player% 9
3:
- eco give %PLAYER% 8
- eco give %player% 8
4:
- eco give %PLAYER% 7
- eco give %player% 7
5:
- eco give %PLAYER% 6
- eco give %player% 6
6:
- eco give %PLAYER% 5
- eco give %player% 5
7:
- eco give %PLAYER% 4
- eco give %player% 4
8:
- eco give %PLAYER% 3
- eco give %player% 3
9:
- eco give %PLAYER% 2
- eco give %player% 2
10:
- eco give %PLAYER% 1
- eco give %player% 1
+1 -1
View File
@@ -121,7 +121,7 @@ Back-To-Hub:
Options-Menu:
permission: ""
execute:
- ""
- "p:bb menu"
displayname: "&a&lOptions menu &7(Right Click)"
lore:
- "&7Right-click to open options menu"