├── .github └── workflows │ └── build.yml ├── .gitignore ├── LICENSE ├── README.md ├── pom.xml └── src ├── main ├── java │ └── world │ │ └── bentobox │ │ └── aoneblock │ │ ├── AOneBlock.java │ │ ├── AOneBlockPlaceholders.java │ │ ├── AOneBlockPladdon.java │ │ ├── Settings.java │ │ ├── commands │ │ ├── admin │ │ │ ├── AdminCommand.java │ │ │ ├── AdminSanityCheck.java │ │ │ ├── AdminSetChestCommand.java │ │ │ └── AdminSetCountCommand.java │ │ └── island │ │ │ ├── IslandBossBarCommand.java │ │ │ ├── IslandCountCommand.java │ │ │ ├── IslandPhasesCommand.java │ │ │ ├── IslandRespawnBlockCommand.java │ │ │ ├── IslandSetCountCommand.java │ │ │ └── PlayerCommand.java │ │ ├── dataobjects │ │ └── OneBlockIslands.java │ │ ├── events │ │ ├── AbstractMagicBlockEvent.java │ │ ├── BlockClearEvent.java │ │ ├── MagicBlockEntityEvent.java │ │ ├── MagicBlockEvent.java │ │ └── MagicBlockPhaseEvent.java │ │ ├── generators │ │ └── ChunkGeneratorWorld.java │ │ ├── listeners │ │ ├── BlockListener.java │ │ ├── BlockProtect.java │ │ ├── BossBarListener.java │ │ ├── CheckPhase.java │ │ ├── HoloListener.java │ │ ├── InfoListener.java │ │ ├── ItemsAdderListener.java │ │ ├── JoinLeaveListener.java │ │ ├── MakeSpace.java │ │ ├── NoBlockHandler.java │ │ ├── StartSafetyListener.java │ │ └── WarningSounder.java │ │ ├── oneblocks │ │ ├── MobAspects.java │ │ ├── OneBlockCustomBlock.java │ │ ├── OneBlockCustomBlockCreator.java │ │ ├── OneBlockObject.java │ │ ├── OneBlockPhase.java │ │ ├── OneBlocksManager.java │ │ ├── Requirement.java │ │ └── customblock │ │ │ ├── BlockDataCustomBlock.java │ │ │ ├── ItemsAdderCustomBlock.java │ │ │ └── MobCustomBlock.java │ │ ├── panels │ │ └── PhasesPanel.java │ │ └── requests │ │ ├── IslandStatsHandler.java │ │ └── LocationStatsHandler.java └── resources │ ├── addon.yml │ ├── blueprints │ ├── bedrock.blu │ └── default.json │ ├── config.yml │ ├── locales │ ├── cs.yml │ ├── de.yml │ ├── en-US.yml │ ├── es.yml │ ├── fr.yml │ ├── hr.yml │ ├── hu.yml │ ├── id.yml │ ├── it.yml │ ├── ja.yml │ ├── pl.yml │ ├── pt.yml │ ├── ru.yml │ ├── tr.yml │ ├── uk.yml │ ├── vi.yml │ ├── zh-CN.yml │ └── zh-TW.yml │ ├── panels │ └── phases_panel.yml │ ├── phases │ ├── 0_plains.yml │ ├── 0_plains_chests.yml │ ├── 10500_deep_dark.yml │ ├── 10500_deep_dark_chests.yml │ ├── 11500_the end.yml │ ├── 11500_the end_chests.yml │ ├── 12000_goto_0.yml │ ├── 2000_winter.yml │ ├── 2000_winter_chests.yml │ ├── 3000_ocean.yml │ ├── 3000_ocean_chests.yml │ ├── 4000_jungle.yml │ ├── 4000_jungle_chests.yml │ ├── 5000_swamp.yml │ ├── 5000_swamp_chests.yml │ ├── 6000_dungeon.yml │ ├── 6000_dungeon_chests.yml │ ├── 7000_desert.yml │ ├── 7000_desert_chests.yml │ ├── 700_underground.yml │ ├── 700_underground_chests.yml │ ├── 7500_the nether.yml │ ├── 7500_the nether_chests.yml │ ├── 8500_plenty.yml │ ├── 8500_plenty_chests.yml │ ├── 9500_desolation.yml │ └── 9500_desolation_chests.yml │ └── plugin.yml └── test └── java └── world └── bentobox └── aoneblock ├── AOneBlockTest.java ├── PlaceholdersManagerTest.java ├── SettingsTest.java ├── commands └── island │ └── IslandSetCountCommandTest.java ├── dataobjects └── OneBlockIslandsTest.java ├── listeners ├── BlockListenerTest.java ├── BlockProtectTest.java ├── CheckPhaseTest.java ├── InfoListenerTest.java ├── JoinLeaveListenerTest.java ├── NoBlockHandlerTest.java └── StartSafetyListenerTest.java ├── mocks └── ServerMocks.java └── oneblocks └── OneBlocksManagerTest3.java /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | branches: 5 | - develop 6 | - master 7 | pull_request: 8 | types: [opened, synchronize, reopened] 9 | jobs: 10 | build: 11 | name: Build 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | with: 16 | fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis 17 | - name: Set up JDK 17 18 | uses: actions/setup-java@v3 19 | with: 20 | distribution: 'adopt' 21 | java-version: 17 22 | - name: Cache SonarCloud packages 23 | uses: actions/cache@v3 24 | with: 25 | path: ~/.sonar/cache 26 | key: ${{ runner.os }}-sonar 27 | restore-keys: ${{ runner.os }}-sonar 28 | - name: Cache Maven packages 29 | uses: actions/cache@v3 30 | with: 31 | path: ~/.m2 32 | key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} 33 | restore-keys: ${{ runner.os }}-m2 34 | - name: Build and analyze 35 | env: 36 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any 37 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} 38 | run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Git 2 | *.orig 3 | !.gitignore 4 | /.settings/ 5 | 6 | # Windows 7 | Thumbs.db 8 | ehthumbs.db 9 | ehthumbs_vista.db 10 | *.stackdump 11 | [Dd]esktop.ini 12 | $RECYCLE.BIN/ 13 | *.lnk 14 | 15 | # Linux 16 | *~ 17 | .fuse_hidden* 18 | .directory 19 | .Trash-* 20 | .nfs* 21 | 22 | # MacOS 23 | .DS_Store 24 | .AppleDouble 25 | .LSOverride 26 | ._* 27 | 28 | # Java 29 | *.class 30 | *.log 31 | *.ctxt 32 | .mtj.tmp/ 33 | *.jar 34 | *.war 35 | *.nar 36 | *.ear 37 | hs_err_pid* 38 | 39 | # Maven 40 | target/ 41 | pom.xml.tag 42 | pom.xml.releaseBackup 43 | pom.xml.versionsBackup 44 | pom.xml.next 45 | release.properties 46 | dependency-reduced-pom.xml 47 | buildNumber.properties 48 | 49 | # Intellij 50 | *.iml 51 | *.java___jb_tmp___ 52 | .idea/* 53 | *.ipr 54 | *.iws 55 | /out/ 56 | .idea_modules/ 57 | 58 | # Eclipse 59 | *.pydevproject 60 | .metadata 61 | .gradle 62 | bin/ 63 | tmp/ 64 | *.tmp 65 | *.bak 66 | *.swp 67 | *~.nib 68 | local.properties 69 | .settings/ 70 | .loadpath 71 | .project 72 | .externalToolBuilders/ 73 | *.launch 74 | .cproject 75 | .classpath 76 | .buildpath 77 | .target 78 | 79 | # NetBeans 80 | nbproject/private/ 81 | build/ 82 | nbbuild/ 83 | dist/ 84 | nbdist/ 85 | nbactions.xml 86 | nb-configuration.xml 87 | .nb-gradle/ -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/AOneBlockPladdon.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock; 2 | 3 | import world.bentobox.bentobox.api.addons.Addon; 4 | import world.bentobox.bentobox.api.addons.Pladdon; 5 | 6 | public class AOneBlockPladdon extends Pladdon { 7 | 8 | private Addon addon; 9 | 10 | @Override 11 | public Addon getAddon() { 12 | if (addon == null) { 13 | addon = new AOneBlock(); 14 | } 15 | 16 | return addon; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/admin/AdminCommand.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.admin; 2 | 3 | import world.bentobox.bentobox.api.addons.GameModeAddon; 4 | import world.bentobox.bentobox.api.commands.admin.DefaultAdminCommand; 5 | 6 | public class AdminCommand extends DefaultAdminCommand { 7 | 8 | public AdminCommand(GameModeAddon addon) { 9 | super(addon); 10 | } 11 | 12 | /* (non-Javadoc) 13 | * @see world.bentobox.bentobox.api.commands.admin.DefaultAdminCommand#setup() 14 | */ 15 | @Override 16 | public void setup() { 17 | super.setup(); 18 | // Set count 19 | new AdminSetCountCommand(this); 20 | // Set chest 21 | new AdminSetChestCommand(this); 22 | // Sanity 23 | new AdminSanityCheck(this); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/admin/AdminSanityCheck.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.admin; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | 6 | import world.bentobox.aoneblock.AOneBlock; 7 | import world.bentobox.aoneblock.oneblocks.OneBlockPhase; 8 | import world.bentobox.bentobox.api.commands.CompositeCommand; 9 | import world.bentobox.bentobox.api.user.User; 10 | 11 | /** 12 | * Command to run a sanity check 13 | * @author tastybento 14 | * 15 | */ 16 | public class AdminSanityCheck extends CompositeCommand { 17 | 18 | private AOneBlock addon; 19 | private OneBlockPhase phase; 20 | 21 | public AdminSanityCheck(CompositeCommand islandCommand) { 22 | super(islandCommand, "sanity"); 23 | } 24 | 25 | @Override 26 | public void setup() { 27 | setParametersHelp("aoneblock.commands.admin.sanity.parameters"); 28 | setDescription("aoneblock.commands.admin.sanity.description"); 29 | // Permission 30 | setPermission("admin.sanity"); 31 | addon = getAddon(); 32 | } 33 | 34 | @Override 35 | public boolean canExecute(User user, String label, List args) { 36 | // No args 37 | if (args.size() > 1) { 38 | showHelp(this, user); 39 | return false; 40 | } 41 | if (args.isEmpty()) return true; 42 | // Check phase 43 | Optional opPhase = addon.getOneBlockManager().getPhase(args.get(0).toUpperCase()); 44 | if (opPhase.isEmpty()) { 45 | user.sendMessage("aoneblock.commands.admin.setchest.unknown-phase"); 46 | return false; 47 | } else { 48 | phase = opPhase.get(); 49 | } 50 | 51 | return true; 52 | } 53 | 54 | @Override 55 | public boolean execute(User user, String label, List args) { 56 | if (args.isEmpty()) { 57 | addon.getOneBlockManager().getAllProbs(); 58 | } else { 59 | addon.getOneBlockManager().getProbs(phase); 60 | } 61 | if (user.isPlayer()) { 62 | user.sendMessage("aoneblock.commands.admin.setchest.see-console"); 63 | } 64 | return true; 65 | } 66 | 67 | @Override 68 | public Optional> tabComplete(User user, String alias, List args) { 69 | if (args.size() == 2) { 70 | // Get a list of phases 71 | return Optional.of(addon.getOneBlockManager().getPhaseList()); 72 | } 73 | // Return nothing 74 | return Optional.empty(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/admin/AdminSetChestCommand.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.admin; 2 | 3 | import java.util.Arrays; 4 | import java.util.HashMap; 5 | import java.util.List; 6 | import java.util.Map; 7 | import java.util.Optional; 8 | 9 | import org.bukkit.Material; 10 | import org.bukkit.block.Block; 11 | import org.bukkit.block.Chest; 12 | import org.bukkit.block.DoubleChest; 13 | import org.bukkit.inventory.ItemStack; 14 | 15 | import world.bentobox.aoneblock.AOneBlock; 16 | import world.bentobox.aoneblock.oneblocks.OneBlockObject.Rarity; 17 | import world.bentobox.aoneblock.oneblocks.OneBlockPhase; 18 | import world.bentobox.bentobox.api.commands.CompositeCommand; 19 | import world.bentobox.bentobox.api.user.User; 20 | 21 | public class AdminSetChestCommand extends CompositeCommand { 22 | 23 | private static final List RARITY_LIST= Arrays.stream(Rarity.values()).map(Enum::name).toList(); 24 | private AOneBlock addon; 25 | private OneBlockPhase phase; 26 | private Rarity rarity; 27 | private Chest chest; 28 | 29 | public AdminSetChestCommand(CompositeCommand islandCommand) { 30 | super(islandCommand, "setchest"); 31 | } 32 | 33 | @Override 34 | public void setup() { 35 | setParametersHelp("aoneblock.commands.admin.setchest.parameters"); 36 | setDescription("aoneblock.commands.admin.setchest.description"); 37 | // Permission 38 | setPermission("admin.setchest"); 39 | setOnlyPlayer(true); 40 | addon = getAddon(); 41 | } 42 | 43 | @Override 44 | public boolean canExecute(User user, String label, List args) { 45 | // Command is setchest phase rarity 46 | if (args.size() != 2) { 47 | showHelp(this, user); 48 | return false; 49 | } 50 | // Check phase 51 | Optional opPhase = addon.getOneBlockManager().getPhase(args.get(0).toUpperCase()); 52 | if (opPhase.isEmpty()) { 53 | user.sendMessage("aoneblock.commands.admin.setchest.unknown-phase"); 54 | return false; 55 | } else { 56 | phase = opPhase.get(); 57 | } 58 | 59 | // Get rarity 60 | try { 61 | rarity = Rarity.valueOf(args.get(1).toUpperCase()); 62 | } catch (Exception e) { 63 | user.sendMessage("aoneblock.commands.admin.setchest.unknown-rarity"); 64 | return false; 65 | } 66 | 67 | // Check that player is looking at a chest 68 | Block target = user.getPlayer().getTargetBlock(null, 5); 69 | if (!target.getType().equals(Material.CHEST)) { 70 | user.sendMessage("aoneblock.commands.admin.setchest.look-at-chest"); 71 | return false; 72 | } 73 | chest = (Chest)target.getState(); 74 | if (chest.getInventory().getHolder() instanceof DoubleChest) { 75 | user.sendMessage("aoneblock.commands.admin.setchest.only-single-chest"); 76 | return false; 77 | } 78 | return true; 79 | } 80 | 81 | @Override 82 | public boolean execute(User user, String label, List args) { 83 | // Open up a chest GUI 84 | // Get the items 85 | Map items = new HashMap<>(); 86 | for (int slot = 0; slot < chest.getInventory().getSize(); slot++) { 87 | if (chest.getInventory().getItem(slot) == null) { 88 | continue; 89 | } 90 | ItemStack item = chest.getInventory().getItem(slot); 91 | if (item != null && !item.getType().equals(Material.AIR)) { 92 | items.put(slot, item.clone()); 93 | } 94 | } 95 | if (items.isEmpty()) { 96 | user.sendMessage("aoneblock.commands.admin.setchest.chest-is-empty"); 97 | return false; 98 | } 99 | phase.addChest(items, rarity); 100 | if (addon.getOneBlockManager().savePhase(phase)) { 101 | user.sendMessage("aoneblock.commands.admin.setchest.success"); 102 | } else { 103 | user.sendMessage("aoneblock.commands.admin.setchest.failure"); 104 | } 105 | return true; 106 | } 107 | 108 | @Override 109 | public Optional> tabComplete(User user, String alias, List args) { 110 | if (args.size() == 2) { 111 | // Get a list of phases 112 | return Optional.of(addon.getOneBlockManager().getPhaseList()); 113 | } 114 | if (args.size() == 3) { 115 | // Rarity 116 | return Optional.of(RARITY_LIST); 117 | } 118 | // Return nothing 119 | return Optional.empty(); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/admin/AdminSetCountCommand.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.admin; 2 | 3 | import java.util.List; 4 | import java.util.Optional; 5 | import java.util.UUID; 6 | 7 | import world.bentobox.aoneblock.AOneBlock; 8 | import world.bentobox.aoneblock.dataobjects.OneBlockIslands; 9 | import world.bentobox.bentobox.api.commands.CompositeCommand; 10 | import world.bentobox.bentobox.api.localization.TextVariables; 11 | import world.bentobox.bentobox.api.user.User; 12 | import world.bentobox.bentobox.database.objects.Island; 13 | import world.bentobox.bentobox.util.Util; 14 | 15 | public class AdminSetCountCommand extends CompositeCommand { 16 | 17 | private AOneBlock addon; 18 | 19 | public AdminSetCountCommand(CompositeCommand islandCommand) { 20 | super(islandCommand, "setcount"); 21 | } 22 | 23 | @Override 24 | public void setup() { 25 | setParametersHelp("aoneblock.commands.admin.setcount.parameters"); 26 | setDescription("aoneblock.commands.admin.setcount.description"); 27 | // Permission 28 | setPermission("admin.setcount"); 29 | addon = getAddon(); 30 | } 31 | 32 | @Override 33 | public boolean execute(User user, String label, List args) { 34 | if (args.size() < 2 || args.size() > 3 || (args.size() == 3 && !args.get(2).equalsIgnoreCase("lifetime"))) { 35 | showHelp(this, user); 36 | return false; 37 | } 38 | // Get value 39 | // Get new range 40 | if (!Util.isInteger(args.get(1), true) || Integer.parseInt(args.get(1)) < 0) { 41 | user.sendMessage("general.errors.must-be-positive-number", TextVariables.NUMBER, args.get(1)); 42 | return false; 43 | } 44 | int count = Integer.parseInt(args.get(1)); 45 | // Get target player 46 | UUID targetUUID = getPlayers().getUUID(args.get(0)); 47 | if (targetUUID == null) { 48 | user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0)); 49 | return false; 50 | } 51 | // Get their island 52 | Island island = getIslands().getIsland(getWorld(), targetUUID); 53 | if (island == null) { 54 | user.sendMessage("general.errors.no-island"); 55 | return false; 56 | } 57 | OneBlockIslands i = addon.getOneBlocksIsland(island); 58 | if (args.size() == 3 && args.get(2).equalsIgnoreCase("lifetime")) { 59 | i.setLifetime(count); 60 | user.sendMessage("aoneblock.commands.admin.setcount.set-lifetime", TextVariables.NUMBER, String.valueOf(count), TextVariables.NAME, getPlayers().getName(targetUUID)); 61 | } else { 62 | i.setBlockNumber(count); 63 | i.clearQueue(); 64 | user.sendMessage("aoneblock.commands.admin.setcount.set", TextVariables.NUMBER, String.valueOf(count), TextVariables.NAME, getPlayers().getName(targetUUID)); 65 | } 66 | return true; 67 | } 68 | 69 | @Override 70 | public Optional> tabComplete(User user, String alias, List args) { 71 | // Return the player names 72 | return args.size() == 2 ? Optional.of(Util.getOnlinePlayerList(user)) : Optional.empty(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/island/IslandBossBarCommand.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.island; 2 | 3 | import java.util.List; 4 | 5 | import world.bentobox.aoneblock.AOneBlock; 6 | import world.bentobox.bentobox.api.commands.CompositeCommand; 7 | import world.bentobox.bentobox.api.user.User; 8 | 9 | public class IslandBossBarCommand extends CompositeCommand { 10 | 11 | private AOneBlock addon; 12 | 13 | public IslandBossBarCommand(CompositeCommand islandCommand, String label, String[] aliases) 14 | { 15 | super(islandCommand, label, aliases); 16 | } 17 | 18 | @Override 19 | public void setup() { 20 | setDescription("aoneblock.commands.island.bossbar.description"); 21 | setOnlyPlayer(true); 22 | // Permission 23 | setPermission("island.bossbar"); 24 | addon = getAddon(); 25 | } 26 | 27 | @Override 28 | public boolean execute(User user, String label, List args) { 29 | addon.getBossBar().toggleUser(user); 30 | getIslands().getIslandAt(user.getLocation()).ifPresent(i -> { 31 | if (!i.isAllowed(addon.BOSSBAR)) { 32 | user.sendMessage("aoneblock.bossbar.not-active"); 33 | } 34 | }); 35 | return true; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/island/IslandCountCommand.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.island; 2 | 3 | import java.util.List; 4 | import java.util.Objects; 5 | 6 | import world.bentobox.aoneblock.AOneBlock; 7 | import world.bentobox.aoneblock.dataobjects.OneBlockIslands; 8 | import world.bentobox.bentobox.api.commands.CompositeCommand; 9 | import world.bentobox.bentobox.api.localization.TextVariables; 10 | import world.bentobox.bentobox.api.user.User; 11 | import world.bentobox.bentobox.util.Util; 12 | 13 | public class IslandCountCommand extends CompositeCommand { 14 | 15 | private AOneBlock addon; 16 | 17 | public IslandCountCommand(CompositeCommand islandCommand, String label, String[] aliases) 18 | { 19 | super(islandCommand, label, aliases); 20 | } 21 | 22 | @Override 23 | public void setup() { 24 | setDescription("aoneblock.commands.count.description"); 25 | setOnlyPlayer(true); 26 | // Permission 27 | setPermission("count"); 28 | addon = getAddon(); 29 | } 30 | 31 | @Override 32 | public boolean canExecute(User user, String label, List args) { 33 | if (!Util.sameWorld(getWorld(), user.getWorld())) { 34 | user.sendMessage("general.errors.wrong-world"); 35 | return false; 36 | } 37 | if (!getIslands().locationIsOnIsland(user.getPlayer(), user.getLocation())) { 38 | user.sendMessage("commands.island.sethome.must-be-on-your-island"); 39 | return false; 40 | } 41 | return true; 42 | } 43 | 44 | @Override 45 | public boolean execute(User user, String label, List args) { 46 | getIslands().getProtectedIslandAt(Objects.requireNonNull(user.getLocation())).ifPresent(island -> { 47 | OneBlockIslands i = addon.getOneBlocksIsland(island); 48 | user.sendMessage("aoneblock.commands.count.info", TextVariables.NUMBER, String.valueOf(i.getBlockNumber()), TextVariables.NAME, i.getPhaseName()); 49 | }); 50 | return true; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/island/IslandPhasesCommand.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.island; 2 | 3 | import java.util.List; 4 | 5 | import world.bentobox.aoneblock.AOneBlock; 6 | import world.bentobox.aoneblock.panels.PhasesPanel; 7 | import world.bentobox.bentobox.api.commands.CompositeCommand; 8 | import world.bentobox.bentobox.api.user.User; 9 | 10 | public class IslandPhasesCommand extends CompositeCommand { 11 | 12 | private AOneBlock addon; 13 | 14 | public IslandPhasesCommand(CompositeCommand islandCommand, String label, String[] aliases) 15 | { 16 | super(islandCommand, label, aliases); 17 | } 18 | 19 | @Override 20 | public void setup() { 21 | setDescription("aoneblock.commands.phases.description"); 22 | setOnlyPlayer(true); 23 | // Permission 24 | setPermission("phases"); 25 | addon = getAddon(); 26 | } 27 | 28 | @Override 29 | public boolean execute(User user, String label, List args) { 30 | PhasesPanel.openPanel(this.addon, this.getWorld(), user); 31 | return true; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/island/IslandRespawnBlockCommand.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.island; 2 | 3 | import java.util.List; 4 | 5 | import org.bukkit.Bukkit; 6 | import org.bukkit.Material; 7 | import org.bukkit.Particle; 8 | import org.bukkit.event.block.BlockBreakEvent; 9 | import org.bukkit.util.Vector; 10 | 11 | import world.bentobox.aoneblock.listeners.BlockProtect; 12 | import world.bentobox.bentobox.api.commands.CompositeCommand; 13 | import world.bentobox.bentobox.api.user.User; 14 | import world.bentobox.bentobox.database.objects.Island; 15 | import world.bentobox.bentobox.util.Util; 16 | 17 | 18 | /** 19 | * This command checks if center block is AIR or BEDROCK and in such situation it triggers BlockBreakEvent. 20 | */ 21 | public class IslandRespawnBlockCommand extends CompositeCommand 22 | { 23 | 24 | /** 25 | * Instantiates a new Island respawn block command. 26 | * 27 | * @param islandCommand the island command 28 | */ 29 | public IslandRespawnBlockCommand(CompositeCommand islandCommand, String label, String[] aliases) 30 | { 31 | super(islandCommand, label, aliases); 32 | } 33 | 34 | 35 | @Override 36 | public void setup() 37 | { 38 | this.setDescription("aoneblock.commands.respawn-block.description"); 39 | this.setOnlyPlayer(true); 40 | // Permission 41 | this.setPermission("respawn-block"); 42 | } 43 | 44 | 45 | @Override 46 | public boolean canExecute(User user, String label, List args) 47 | { 48 | if (!Util.sameWorld(getWorld(), user.getWorld())) 49 | { 50 | user.sendMessage("general.errors.wrong-world"); 51 | return false; 52 | } 53 | 54 | Island island = this.getIslands().getIsland(this.getWorld(), user); 55 | 56 | if (island == null) 57 | { 58 | user.sendMessage("general.errors.no-island"); 59 | return false; 60 | } 61 | 62 | return true; 63 | } 64 | 65 | 66 | @Override 67 | public boolean execute(User user, String label, List args) 68 | { 69 | Island island = this.getIslands().getIsland(this.getWorld(), user); 70 | 71 | if (island == null) 72 | { 73 | // Hmm, lost island so fast. Well, no, just idea null-pointer check bypass. 74 | user.sendMessage("general.errors.no-island"); 75 | } 76 | else if (Material.BEDROCK.equals(island.getCenter().getBlock().getType()) || 77 | Material.AIR.equals(island.getCenter().getBlock().getType())) 78 | { 79 | // Trigger manual block break event. 80 | Bukkit.getServer().getPluginManager().callEvent( 81 | new BlockBreakEvent(island.getCenter().getBlock(), user.getPlayer())); 82 | 83 | user.sendMessage("aoneblock.commands.respawn-block.block-respawned"); 84 | } 85 | else 86 | { 87 | for (double x = 0.0; x <= 1.0; x += 0.5) { 88 | for (double y = 0.0; y <= 1.0; y += 0.5) { 89 | for (double z = 0.0; z < 1.0; z += 0.5) { 90 | island.getWorld().spawnParticle(Particle.DUST, island.getCenter().add(new Vector(x, y, z)), 91 | 5, 0.1, 0, 0.1, 1, new Particle.DustOptions(BlockProtect.GREEN, 1)); 92 | } 93 | } 94 | } 95 | user.sendMessage("aoneblock.commands.respawn-block.block-exist"); 96 | } 97 | 98 | return true; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/island/IslandSetCountCommand.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.island; 2 | 3 | import java.util.List; 4 | import java.util.Objects; 5 | 6 | import org.eclipse.jdt.annotation.NonNull; 7 | 8 | import world.bentobox.aoneblock.AOneBlock; 9 | import world.bentobox.aoneblock.dataobjects.OneBlockIslands; 10 | import world.bentobox.bentobox.api.commands.CompositeCommand; 11 | import world.bentobox.bentobox.api.localization.TextVariables; 12 | import world.bentobox.bentobox.api.user.User; 13 | import world.bentobox.bentobox.database.objects.Island; 14 | import world.bentobox.bentobox.managers.RanksManager; 15 | import world.bentobox.bentobox.util.Util; 16 | 17 | /** 18 | * Enables a player to set their count to anything less than they 19 | * have done so far. 20 | * @author tastybento 21 | * 22 | */ 23 | public class IslandSetCountCommand extends CompositeCommand { 24 | 25 | private AOneBlock addon; 26 | 27 | public IslandSetCountCommand(CompositeCommand islandCommand, String label, String[] aliases) 28 | { 29 | super(islandCommand, label, aliases); 30 | } 31 | 32 | @Override 33 | public void setup() { 34 | setOnlyPlayer(true); 35 | setParametersHelp("aoneblock.commands.island.setcount.parameters"); 36 | setDescription("aoneblock.commands.island.setcount.description"); 37 | // Permission 38 | setPermission("island.setcount"); 39 | addon = getAddon(); 40 | setConfigurableRankCommand(); 41 | } 42 | 43 | @Override 44 | public boolean canExecute(User user, String label, List args) { 45 | // Check cooldown 46 | return addon.getSettings().getSetCountCooldown() <= 0 || !checkCooldown(user); 47 | } 48 | 49 | @Override 50 | public boolean execute(User user, String label, List args) { 51 | if (args.size() != 1) { 52 | showHelp(this, user); 53 | return false; 54 | } 55 | // Player issuing the command must have an island or be in a team 56 | if (!getIslands().inTeam(getWorld(), user.getUniqueId()) && !getIslands().hasIsland(getWorld(), user.getUniqueId())) { 57 | user.sendMessage("general.errors.no-island"); 58 | return false; 59 | } 60 | // Check rank to use command 61 | Island island = Objects.requireNonNull(getIslands().getIsland(getWorld(), user)); 62 | int rank = island.getRank(user); 63 | if (rank < island.getRankCommand(getUsage())) { 64 | user.sendMessage("general.errors.insufficient-rank", TextVariables.RANK, 65 | user.getTranslation(RanksManager.getInstance().getRank(rank))); 66 | return false; 67 | } 68 | // Get value 69 | // Get new range 70 | if (!Util.isInteger(args.get(0), true) || Integer.parseInt(args.get(0)) < 0) { 71 | user.sendMessage("general.errors.must-be-positive-number", TextVariables.NUMBER, args.get(0)); 72 | return false; 73 | } 74 | int count = Integer.parseInt(args.get(0)); 75 | // Check the value is lower than played so far 76 | @NonNull 77 | OneBlockIslands i = addon.getBlockListener().getIsland(island); 78 | long maxCount = i.getLifetime(); 79 | if (count > maxCount) { 80 | user.sendMessage("aoneblock.commands.island.setcount.too-high", TextVariables.NUMBER, String.valueOf(maxCount)); 81 | return false; 82 | } 83 | i.setBlockNumber(count); 84 | i.clearQueue(); 85 | user.sendMessage("aoneblock.commands.island.setcount.set", TextVariables.NUMBER, String.valueOf(i.getBlockNumber())); 86 | setCooldown(user.getUniqueId(), addon.getSettings().getSetCountCooldown() * 60); 87 | return true; 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/commands/island/PlayerCommand.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.commands.island; 2 | 3 | import world.bentobox.aoneblock.AOneBlock; 4 | import world.bentobox.aoneblock.Settings; 5 | import world.bentobox.bentobox.api.commands.island.DefaultPlayerCommand; 6 | 7 | public class PlayerCommand extends DefaultPlayerCommand { 8 | 9 | public PlayerCommand(AOneBlock addon) { 10 | super(addon); 11 | } 12 | 13 | /* (non-Javadoc) 14 | * @see world.bentobox.bentobox.api.commands.island.DefaultPlayerCommand#setup() 15 | */ 16 | @Override 17 | public void setup() { 18 | super.setup(); 19 | 20 | Settings settings = this.getAddon().getSettings(); 21 | 22 | // Count 23 | new IslandCountCommand(this, 24 | settings.getCountCommand().split(" ")[0], 25 | settings.getCountCommand().split(" ")); 26 | // Phase list 27 | new IslandPhasesCommand(this, 28 | settings.getPhasesCommand().split(" ")[0], 29 | settings.getPhasesCommand().split(" ")); 30 | // Set Count 31 | new IslandSetCountCommand(this, 32 | settings.getSetCountCommand().split(" ")[0], 33 | settings.getSetCountCommand().split(" ")); 34 | // Force block respawn 35 | new IslandRespawnBlockCommand(this, 36 | settings.getRespawnBlockCommand().split(" ")[0], 37 | settings.getRespawnBlockCommand().split(" ")); 38 | // Boss bar 39 | new IslandBossBarCommand(this, settings.getBossBarCommand().split(" ")[0], 40 | settings.getBossBarCommand().split(" ")); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/events/AbstractMagicBlockEvent.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.events; 2 | 3 | import java.util.UUID; 4 | 5 | import org.bukkit.block.Block; 6 | import org.eclipse.jdt.annotation.NonNull; 7 | import org.eclipse.jdt.annotation.Nullable; 8 | 9 | import world.bentobox.bentobox.api.events.BentoBoxEvent; 10 | import world.bentobox.bentobox.database.objects.Island; 11 | 12 | /** 13 | * Event that is fired when the magic block is broken 14 | * @author tastybento 15 | * 16 | */ 17 | public abstract class AbstractMagicBlockEvent extends BentoBoxEvent { 18 | 19 | protected final Island island; 20 | protected final UUID playerUUID; 21 | protected final Block block; 22 | 23 | /** 24 | * @param island - island where the magic block is located 25 | * @param playerUUID - the player involved 26 | * @param block - block involved in the event 27 | */ 28 | protected AbstractMagicBlockEvent(@NonNull Island island, @Nullable UUID playerUUID, @NonNull Block block) { 29 | super(); 30 | this.island = island; 31 | this.playerUUID = playerUUID; 32 | this.block = block; 33 | } 34 | 35 | /** 36 | * @return the island where this is happening 37 | */ 38 | @NonNull 39 | public Island getIsland() { 40 | return island; 41 | } 42 | 43 | /** 44 | * @return the playerUUID if any involved 45 | */ 46 | @Nullable 47 | public UUID getPlayerUUID() { 48 | return playerUUID; 49 | } 50 | 51 | /** 52 | * @return the magic block 53 | */ 54 | @NonNull 55 | public Block getBlock() { 56 | return block; 57 | } 58 | 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/events/BlockClearEvent.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.events; 2 | 3 | import java.util.List; 4 | 5 | import org.bukkit.block.Block; 6 | import org.bukkit.entity.Entity; 7 | import org.bukkit.event.Cancellable; 8 | import org.bukkit.event.HandlerList; 9 | 10 | import world.bentobox.bentobox.api.events.BentoBoxEvent; 11 | 12 | /** 13 | * Event that is fired when the addon clears blocks when the magic block spawns an entity. 14 | * @author tastybento 15 | * 16 | */ 17 | public class BlockClearEvent extends BentoBoxEvent implements Cancellable { 18 | 19 | private static final HandlerList handlers = new HandlerList(); 20 | protected final Entity entity; 21 | protected final List airBlocks; 22 | protected final List waterBlocks; 23 | protected boolean cancel; 24 | 25 | @Override 26 | public HandlerList getHandlers() { 27 | return getHandlerList(); 28 | } 29 | 30 | public static HandlerList getHandlerList() { 31 | return handlers; 32 | } 33 | 34 | /** 35 | * Event that is fired when the addon clears blocks when the magic block spawns an entity. 36 | * Blocks cleared are the size of the entity's hitbox, so can be any size depending on the 37 | * entity. Blocks are cleared by calling the Bukkit breakNaturally block method, then set to air. 38 | * If the entity is a water mob then after breaking the blocks, the blocks are set to water 39 | * and a single block layer of air above will be created (dolphins need air). 40 | * Canceling the event will prevent all of this. Removing a block from the block list will 41 | * prevent it happening to that block. 42 | * @param entity entity spawning 43 | * @param airBlocks air blocks that will be created around it. 44 | * @param waterBlocks water blocks that will be created, if entity is a water mob 45 | */ 46 | public BlockClearEvent(Entity entity, List airBlocks, List waterBlocks) { 47 | this.entity = entity; 48 | this.airBlocks = airBlocks; 49 | this.waterBlocks = waterBlocks; 50 | } 51 | 52 | /** 53 | * This is the entity that is spawning 54 | * @return the entity 55 | */ 56 | public Entity getEntity() { 57 | return entity; 58 | } 59 | 60 | /** 61 | * These blocks will be set to air 62 | * @return the airBlocks 63 | */ 64 | public List getAirBlocks() { 65 | return airBlocks; 66 | } 67 | 68 | /** 69 | * These blocks will be set to water 70 | * @return the waterBlocks 71 | */ 72 | public List getWaterBlocks() { 73 | return waterBlocks; 74 | } 75 | 76 | @Override 77 | public boolean isCancelled() { 78 | return cancel; 79 | } 80 | 81 | @Override 82 | public void setCancelled(boolean cancel) { 83 | this.cancel = cancel; 84 | 85 | } 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/events/MagicBlockEntityEvent.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.events; 2 | 3 | import java.util.UUID; 4 | 5 | import org.bukkit.block.Block; 6 | import org.bukkit.entity.EntityType; 7 | import org.bukkit.event.HandlerList; 8 | import org.eclipse.jdt.annotation.NonNull; 9 | 10 | import world.bentobox.bentobox.database.objects.Island; 11 | 12 | /** 13 | * Event that is fired when the magic block spawns an entity 14 | * @author tastybento 15 | * 16 | */ 17 | public class MagicBlockEntityEvent extends AbstractMagicBlockEvent { 18 | 19 | protected final EntityType entityType; 20 | private static final HandlerList handlers = new HandlerList(); 21 | 22 | @Override 23 | public HandlerList getHandlers() { 24 | return getHandlerList(); 25 | } 26 | 27 | public static HandlerList getHandlerList() { 28 | return handlers; 29 | } 30 | 31 | /** 32 | * @param island - island 33 | * @param playerUUID - player UUID 34 | * @param block - block 35 | * @param entityType - entity type 36 | */ 37 | public MagicBlockEntityEvent(Island island, UUID playerUUID, Block block, EntityType entityType) { 38 | super(island, playerUUID, block); 39 | this.entityType = entityType; 40 | } 41 | 42 | /** 43 | * @return the entityType spawned on the magic block 44 | */ 45 | @NonNull 46 | public EntityType getEntityType() { 47 | return entityType; 48 | } 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/events/MagicBlockEvent.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.events; 2 | 3 | import java.util.UUID; 4 | 5 | import org.bukkit.Material; 6 | import org.bukkit.block.Block; 7 | import org.bukkit.event.HandlerList; 8 | import org.bukkit.inventory.ItemStack; 9 | import org.eclipse.jdt.annotation.NonNull; 10 | import org.eclipse.jdt.annotation.Nullable; 11 | 12 | import world.bentobox.bentobox.database.objects.Island; 13 | 14 | /** 15 | * Event that is fired when the magic block is broken 16 | * @author tastybento 17 | * 18 | */ 19 | public class MagicBlockEvent extends AbstractMagicBlockEvent { 20 | 21 | protected final ItemStack tool; 22 | protected final Material nextBlockMaterial; 23 | private static final HandlerList handlers = new HandlerList(); 24 | 25 | @Override 26 | public HandlerList getHandlers() { 27 | return getHandlerList(); 28 | } 29 | 30 | public static HandlerList getHandlerList() { 31 | return handlers; 32 | } 33 | 34 | /** 35 | * @param island - island where the magic block is located 36 | * @param playerUUID - the player involved 37 | * @param tool - item stack for tool used 38 | * @param block - block broken 39 | * @param nextBlockMaterial - next block material 40 | */ 41 | public MagicBlockEvent(@NonNull Island island, @Nullable UUID playerUUID, @Nullable ItemStack tool, @NonNull Block block, @Nullable Material nextBlockMaterial) { 42 | super(island, playerUUID, block); 43 | this.tool = tool; 44 | this.nextBlockMaterial = nextBlockMaterial; 45 | } 46 | 47 | /** 48 | * @return the tool used. May be AIR if hands are used 49 | */ 50 | public ItemStack getTool() { 51 | return tool; 52 | } 53 | 54 | /** 55 | * @return the next Block Material that will be spawned. May be null if an entity is to be spawned 56 | */ 57 | @Nullable 58 | public Material getNextBlockMaterial() { 59 | return nextBlockMaterial; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/events/MagicBlockPhaseEvent.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.events; 2 | 3 | import java.util.UUID; 4 | 5 | import org.bukkit.block.Block; 6 | import org.bukkit.event.HandlerList; 7 | import org.eclipse.jdt.annotation.NonNull; 8 | 9 | import world.bentobox.bentobox.database.objects.Island; 10 | 11 | /** 12 | * Event that is fired when a new phase is triggered 13 | * @author tastybento 14 | * 15 | */ 16 | public class MagicBlockPhaseEvent extends AbstractMagicBlockEvent { 17 | 18 | protected final String phase; 19 | protected final String oldPhase; 20 | protected final int blockNumber; 21 | private static final HandlerList handlers = new HandlerList(); 22 | 23 | @Override 24 | public HandlerList getHandlers() { 25 | return getHandlerList(); 26 | } 27 | 28 | public static HandlerList getHandlerList() { 29 | return handlers; 30 | } 31 | 32 | /** 33 | * @param island - island 34 | * @param playerUUID - player UUID 35 | * @param block - block involved 36 | * @param phase - phase involved 37 | * @param blockNumber - block number 38 | */ 39 | public MagicBlockPhaseEvent(Island island, UUID playerUUID, Block block, String phase, String oldPhase, int blockNumber) { 40 | super(island, playerUUID, block); 41 | this.phase = phase; 42 | this.oldPhase = oldPhase; 43 | this.blockNumber = blockNumber; 44 | } 45 | /** 46 | * @return the new phase 47 | */ 48 | @NonNull 49 | public String getPhase() { 50 | return phase; 51 | } 52 | /** 53 | * @return the blockNumber 54 | */ 55 | public int getBlockNumber() { 56 | return blockNumber; 57 | } 58 | /** 59 | * @return the original phase 60 | */ 61 | public String getOldPhase() { 62 | return oldPhase; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/generators/ChunkGeneratorWorld.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.generators; 2 | 3 | import java.util.Collections; 4 | import java.util.List; 5 | import java.util.Random; 6 | 7 | import org.bukkit.World; 8 | import org.bukkit.generator.BlockPopulator; 9 | import org.bukkit.generator.ChunkGenerator; 10 | 11 | import world.bentobox.aoneblock.AOneBlock; 12 | 13 | /** 14 | * @author tastybento 15 | * Creates the world 16 | */ 17 | public class ChunkGeneratorWorld extends ChunkGenerator { 18 | 19 | /** 20 | * @param addon - addon 21 | */ 22 | public ChunkGeneratorWorld(AOneBlock addon) { 23 | super(); 24 | } 25 | 26 | @SuppressWarnings("deprecation") 27 | public ChunkData generateChunks(World world) { 28 | return createChunkData(world); 29 | } 30 | 31 | @Override 32 | @Deprecated 33 | public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biomeGrid) { 34 | return generateChunks(world); 35 | } 36 | 37 | // This needs to be set to return true to override minecraft's default 38 | // behavior 39 | @Override 40 | public boolean canSpawn(World world, int x, int z) { 41 | return true; 42 | } 43 | 44 | @Override 45 | public List getDefaultPopulators(final World world) { 46 | return Collections.emptyList(); 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/listeners/BlockProtect.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.listeners; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collections; 5 | import java.util.Iterator; 6 | import java.util.List; 7 | 8 | import org.bukkit.Color; 9 | import org.bukkit.Location; 10 | import org.bukkit.Particle; 11 | import org.bukkit.block.Block; 12 | import org.bukkit.entity.EntityType; 13 | import org.bukkit.event.Cancellable; 14 | import org.bukkit.event.EventHandler; 15 | import org.bukkit.event.EventPriority; 16 | import org.bukkit.event.Listener; 17 | import org.bukkit.event.block.Action; 18 | import org.bukkit.event.block.BlockPistonExtendEvent; 19 | import org.bukkit.event.block.BlockPistonRetractEvent; 20 | import org.bukkit.event.entity.EntityChangeBlockEvent; 21 | import org.bukkit.event.entity.EntityExplodeEvent; 22 | import org.bukkit.event.entity.EntitySpawnEvent; 23 | import org.bukkit.event.player.PlayerInteractEvent; 24 | import org.bukkit.util.Vector; 25 | 26 | import world.bentobox.aoneblock.AOneBlock; 27 | import world.bentobox.bentobox.database.objects.Island; 28 | 29 | public class BlockProtect implements Listener { 30 | 31 | public static final Color GREEN = Color.fromBGR(0, 100, 0); 32 | private static final List PARTICLES = new ArrayList<>(List.of(Particle.DUST)); 33 | private Iterator particleIterator = Collections.emptyIterator(); 34 | 35 | private final AOneBlock addon; 36 | 37 | /** 38 | * @param addon - AOneBlock addon 39 | */ 40 | public BlockProtect(AOneBlock addon) { 41 | this.addon = addon; 42 | } 43 | 44 | /** 45 | * Show particles when block is hit 46 | * @param e - event 47 | */ 48 | @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) 49 | public void onBlockDamage(PlayerInteractEvent e) { 50 | Action action = e.getAction(); 51 | String clickType = addon.getSettings().getClickType(); 52 | 53 | if (clickType.equalsIgnoreCase("NONE") || !addon.inWorld(e.getPlayer().getWorld()) 54 | || e.getClickedBlock() == null) { 55 | return; 56 | } 57 | 58 | if ((action == Action.LEFT_CLICK_BLOCK && clickType.equalsIgnoreCase("LEFT")) 59 | || (action == Action.RIGHT_CLICK_BLOCK && clickType.equalsIgnoreCase("RIGHT"))) { 60 | 61 | Location l = e.getClickedBlock().getLocation(); 62 | addon.getIslands().getIslandAt(l).map(Island::getCenter).filter(center -> center.equals(l)) 63 | .ifPresent(this::showSparkles); 64 | } 65 | } 66 | 67 | public void showSparkles(Location location) { 68 | if (!particleIterator.hasNext()) { 69 | Collections.shuffle(PARTICLES); 70 | particleIterator = PARTICLES.iterator(); 71 | } 72 | Particle p = particleIterator.next(); 73 | for (double x = -0.5; x <= 1.5; x += addon.getSettings().getParticleDensity()) { 74 | for (double y = 0.0; y <= 1.5; y += addon.getSettings().getParticleDensity()) { 75 | for (double z = -0.5; z < 1.5; z += addon.getSettings().getParticleDensity()) { 76 | location.getWorld().spawnParticle(p, location.clone().add(new Vector(x, y, z)), 5, 77 | 0.1, 0, 0.1, 1, new Particle.DustOptions(addon.getSettings().getParticleColor(), 78 | addon.getSettings().getParticleSize().floatValue())); 79 | 80 | } 81 | } 82 | } 83 | } 84 | 85 | /** 86 | * Prevent entities other than players changing the magic block 87 | * @param e - EntityChangeBlockEvent 88 | */ 89 | @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) 90 | public void onBlockChange(final EntityChangeBlockEvent e) { 91 | if (!addon.inWorld(e.getBlock().getWorld())) { 92 | return; 93 | } 94 | Location l = e.getBlock().getLocation(); 95 | addon.getIslands().getIslandAt(l).filter(i -> l.equals(i.getCenter())).ifPresent(i -> e.setCancelled(true)); 96 | } 97 | 98 | /** 99 | * Blocks oneblocks from being blown up 100 | * @param e - EntityExplodeEvent 101 | */ 102 | @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) 103 | public void onExplosion(final EntityExplodeEvent e) { 104 | if (!addon.inWorld(e.getLocation().getWorld())) { 105 | return; 106 | } 107 | e.blockList().removeIf(b -> addon.getIslands().getIslandAt(b.getLocation()).filter(i -> b.getLocation().equals(i.getCenter())).isPresent()); 108 | } 109 | 110 | /** 111 | * Prevent block from being pushed by a piston 112 | * @param e - BlockPistonExtendEvent 113 | */ 114 | @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) 115 | public void onPistonExtend(BlockPistonExtendEvent e) { 116 | checkPiston(e, e.getBlock(), e.getBlocks()); 117 | } 118 | /** 119 | * Prevent block from being pulled by a sticky piston 120 | * @param e - BlockPistonRetractEvent 121 | */ 122 | @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) 123 | public void onPistonRetract(BlockPistonRetractEvent e) { 124 | checkPiston(e, e.getBlock(), e.getBlocks()); 125 | } 126 | private void checkPiston(Cancellable e, Block block, List blocks) { 127 | if (!addon.inWorld(block.getWorld())) { 128 | return; 129 | } 130 | Location l = block.getLocation(); 131 | addon.getIslands().getIslandAt(l).map(Island::getCenter).ifPresent(c -> e.setCancelled( 132 | // Run through the location of all the relative blocks and see if they match the oneblock location 133 | blocks.stream().map(Block::getLocation).anyMatch(loc -> loc.equals(c))) 134 | ); 135 | } 136 | 137 | /** 138 | * Prevent falling blocks from happening 139 | * @param e - event 140 | */ 141 | @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) 142 | public void onFallingBlockSpawn(EntitySpawnEvent e) { 143 | if (!e.getEntityType().equals(EntityType.FALLING_BLOCK) || !addon.inWorld(e.getEntity().getWorld())) { 144 | return; 145 | } 146 | Location l = e.getLocation(); 147 | // Dropped blocks do not spawn on integer locations, so we have to check block values independently 148 | addon.getIslands().getIslandAt(l).filter(i -> l.getBlockX() == i.getCenter().getBlockX() 149 | && l.getBlockY() == i.getCenter().getBlockY() 150 | && l.getBlockZ() == i.getCenter().getBlockZ() 151 | ).ifPresent(i -> e.setCancelled(true)); 152 | } 153 | 154 | 155 | } 156 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/listeners/InfoListener.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.listeners; 2 | 3 | import org.bukkit.Bukkit; 4 | import org.bukkit.event.EventHandler; 5 | import org.bukkit.event.EventPriority; 6 | import org.bukkit.event.Listener; 7 | import org.eclipse.jdt.annotation.NonNull; 8 | 9 | import world.bentobox.aoneblock.AOneBlock; 10 | import world.bentobox.aoneblock.dataobjects.OneBlockIslands; 11 | import world.bentobox.bentobox.api.events.island.IslandInfoEvent; 12 | import world.bentobox.bentobox.api.localization.TextVariables; 13 | import world.bentobox.bentobox.api.user.User; 14 | 15 | public class InfoListener implements Listener { 16 | 17 | final AOneBlock addon; 18 | 19 | /** 20 | * Add info to the info command 21 | * @param addon - AOneBlock 22 | */ 23 | public InfoListener(AOneBlock addon) { 24 | this.addon = addon; 25 | } 26 | 27 | /** 28 | * Save island on player quitting 29 | * @param e - event 30 | */ 31 | @EventHandler(priority = EventPriority.NORMAL) 32 | public void onInfo(IslandInfoEvent e) { 33 | // Check if island is in AOneBlock 34 | if (!addon.equals(e.getAddon())) return; 35 | User user = e.getPlayerUUID() == null ? User.getInstance(Bukkit.getConsoleSender()) : User.getInstance(e.getPlayerUUID()); 36 | @NonNull 37 | OneBlockIslands is = addon.getOneBlocksIsland(e.getIsland()); 38 | if (is.getBlockNumber() == 0) { 39 | return; 40 | } 41 | user.sendMessage("aoneblock.commands.info.count", TextVariables.NUMBER, String.valueOf(is.getBlockNumber()), 42 | TextVariables.NAME, is.getPhaseName(), 43 | "[lifetime]", String.valueOf(is.getLifetime()) 44 | ); 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/listeners/ItemsAdderListener.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.listeners; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.Listener; 5 | 6 | import dev.lone.itemsadder.api.Events.ItemsAdderLoadDataEvent; 7 | import world.bentobox.aoneblock.AOneBlock; 8 | 9 | /** 10 | * Handles ItemsAdderLoadDataEvent which fired when ItemsAdder loaded it's data or reload it's data 11 | * 12 | * @author Teenkung123 13 | */ 14 | public class ItemsAdderListener implements Listener { 15 | 16 | private final AOneBlock addon; 17 | public ItemsAdderListener(AOneBlock addon) { 18 | this.addon = addon; 19 | } 20 | 21 | /** 22 | * handle ItemsAdderLoadDataEvent then reload the addon if it's get triggered 23 | * @param e - ItemsAdderLoadDataEvent 24 | */ 25 | @EventHandler 26 | public void onLoad(ItemsAdderLoadDataEvent e) { 27 | addon.loadData(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/listeners/JoinLeaveListener.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.listeners; 2 | 3 | import org.bukkit.event.EventHandler; 4 | import org.bukkit.event.EventPriority; 5 | import org.bukkit.event.Listener; 6 | import org.bukkit.event.player.PlayerQuitEvent; 7 | 8 | import world.bentobox.aoneblock.AOneBlock; 9 | import world.bentobox.bentobox.database.objects.Island; 10 | import world.bentobox.bentobox.util.Util; 11 | 12 | public class JoinLeaveListener implements Listener { 13 | 14 | final AOneBlock addon; 15 | 16 | /** 17 | * Save island on player quitting 18 | * @param addon - AOneBlock 19 | */ 20 | public JoinLeaveListener(AOneBlock addon) { 21 | this.addon = addon; 22 | } 23 | 24 | /** 25 | * Save island on player quitting 26 | * @param e - event 27 | */ 28 | @EventHandler(priority = EventPriority.NORMAL) 29 | public void onPlayerQuit(PlayerQuitEvent e) { 30 | Island island = addon.getIslands().getIsland(addon.getOverWorld(), e.getPlayer().getUniqueId()); 31 | if (island != null) { 32 | addon.getBlockListener().saveIsland(island).thenAccept(r -> { 33 | if (Boolean.FALSE.equals(r)) { 34 | addon.logError("Could not save AOneBlock island at " + Util.xyz(island.getCenter().toVector()) + " to database " + island.getUniqueId()); 35 | } 36 | }); 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/listeners/NoBlockHandler.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.listeners; 2 | 3 | import java.util.Objects; 4 | 5 | import org.bukkit.Material; 6 | import org.bukkit.event.EventHandler; 7 | import org.bukkit.event.EventPriority; 8 | import org.bukkit.event.Listener; 9 | import org.bukkit.event.player.PlayerRespawnEvent; 10 | 11 | import world.bentobox.aoneblock.AOneBlock; 12 | import world.bentobox.bentobox.database.objects.Island; 13 | 14 | /** 15 | * Handles the situation when there is no block to go back to after death respawn 16 | * @author tastybento 17 | * 18 | */ 19 | public class NoBlockHandler implements Listener { 20 | 21 | private final AOneBlock addon; 22 | 23 | public NoBlockHandler(AOneBlock oneBlock) { 24 | this.addon = oneBlock; 25 | } 26 | 27 | @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) 28 | public void onRespawn(PlayerRespawnEvent e) { 29 | if (!addon.inWorld(e.getRespawnLocation().getWorld())) { 30 | return; 31 | } 32 | // Check if block is air 33 | Island island = addon.getIslands().getIsland(e.getRespawnLocation().getWorld(), e.getPlayer().getUniqueId()); 34 | if (island != null && Objects.requireNonNull(island.getCenter()).getBlock().isEmpty()) { 35 | Objects.requireNonNull(island.getCenter()).getBlock().setType(Material.COBBLESTONE); 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/listeners/StartSafetyListener.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.listeners; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | import java.util.UUID; 6 | 7 | import org.bukkit.Bukkit; 8 | import org.bukkit.Location; 9 | import org.bukkit.World; 10 | import org.bukkit.event.EventHandler; 11 | import org.bukkit.event.EventPriority; 12 | import org.bukkit.event.Listener; 13 | import org.bukkit.event.player.PlayerMoveEvent; 14 | 15 | import world.bentobox.aoneblock.AOneBlock; 16 | import world.bentobox.bentobox.api.events.island.IslandCreatedEvent; 17 | import world.bentobox.bentobox.api.events.island.IslandResetEvent; 18 | import world.bentobox.bentobox.api.localization.TextVariables; 19 | import world.bentobox.bentobox.api.user.User; 20 | 21 | /** 22 | * Listener to provide protection for players in the first minute of their island. Prevents movement. 23 | */ 24 | public class StartSafetyListener implements Listener { 25 | 26 | private final AOneBlock addon; 27 | private final Map newIslands = new HashMap<>(); 28 | 29 | public StartSafetyListener(AOneBlock addon) { 30 | super(); 31 | this.addon = addon; 32 | } 33 | 34 | @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) 35 | public void onNewIsland(IslandCreatedEvent e) { 36 | store(e.getIsland().getWorld(), e.getPlayerUUID()); 37 | } 38 | 39 | private void store(World world, UUID playerUUID) { 40 | if (addon.inWorld(world) && addon.START_SAFETY.isSetForWorld(world) && !newIslands.containsKey(playerUUID)) { 41 | long time = addon.getSettings().getStartingSafetyDuration(); 42 | if (time < 0) { 43 | time = 10; // 10 seconds 44 | } 45 | newIslands.put(playerUUID, System.currentTimeMillis() + (time * 1000)); 46 | Bukkit.getScheduler().runTaskLater(addon.getPlugin(), () -> { 47 | newIslands.remove(playerUUID); 48 | User.getInstance(playerUUID).sendMessage("protection.flags.START_SAFETY.free-to-move"); 49 | }, time); 50 | } 51 | 52 | } 53 | 54 | @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) 55 | public void onResetIsland(IslandResetEvent e) { 56 | store(e.getIsland().getWorld(), e.getPlayerUUID()); 57 | } 58 | 59 | @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) 60 | public void onPlayerMove(PlayerMoveEvent e) { 61 | if (addon.inWorld(e.getPlayer().getWorld()) && newIslands.containsKey(e.getPlayer().getUniqueId()) 62 | && e.getTo() != null && !e.getPlayer().isSneaking() 63 | && (e.getFrom().getX() != e.getTo().getX() || e.getFrom().getZ() != e.getTo().getZ())) { 64 | // Do not allow x or z movement 65 | e.setTo(new Location(e.getFrom().getWorld(), e.getFrom().getX(), e.getTo().getY(), e.getFrom().getZ(), 66 | e.getTo().getYaw(), e.getTo().getPitch())); 67 | String waitTime = String 68 | .valueOf((int) ((newIslands.get(e.getPlayer().getUniqueId()) - System.currentTimeMillis()) / 1000)); 69 | User.getInstance(e.getPlayer()).notify(addon.START_SAFETY.getHintReference(), TextVariables.NUMBER, 70 | waitTime); 71 | } 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/listeners/WarningSounder.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.listeners; 2 | 3 | import java.util.Collections; 4 | import java.util.EnumMap; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.bukkit.Color; 9 | import org.bukkit.Particle; 10 | import org.bukkit.Sound; 11 | import org.bukkit.block.Block; 12 | import org.bukkit.entity.EntityType; 13 | import org.bukkit.util.Vector; 14 | import org.eclipse.jdt.annotation.NonNull; 15 | 16 | import world.bentobox.aoneblock.AOneBlock; 17 | import world.bentobox.aoneblock.dataobjects.OneBlockIslands; 18 | import world.bentobox.aoneblock.oneblocks.MobAspects; 19 | 20 | /** 21 | * Plays a warning sound 22 | * @author tastybento 23 | * 24 | */ 25 | public class WarningSounder { 26 | 27 | private final AOneBlock addon; 28 | 29 | /** 30 | * @param addon 31 | */ 32 | public WarningSounder(AOneBlock addon) { 33 | this.addon = addon; 34 | } 35 | /** 36 | * Mob aspects. 37 | */ 38 | private Map MOB_ASPECTS; 39 | 40 | void play(@NonNull OneBlockIslands is, @NonNull Block block) { 41 | if (MOB_ASPECTS == null) { 42 | initialize(); // Done to avoid static definition with Sound due to test issues 43 | } 44 | List opMob = is.getNearestMob(addon.getSettings().getMobWarning()); 45 | opMob.stream().filter(MOB_ASPECTS::containsKey).map(MOB_ASPECTS::get).forEach(s -> { 46 | block.getWorld().playSound(block.getLocation(), s.sound(), 1F, 1F); 47 | block.getWorld().spawnParticle(Particle.DUST, block.getLocation().add(new Vector(0.5, 1.0, 0.5)), 10, 0.5, 48 | 0, 0.5, 1, new Particle.DustOptions(s.color(), 1)); 49 | }); 50 | 51 | } 52 | 53 | private void initialize() { 54 | Map m = new EnumMap<>(EntityType.class); 55 | m.put(EntityType.BLAZE, new MobAspects(Sound.ENTITY_BLAZE_AMBIENT, Color.fromRGB(238, 211, 91))); 56 | m.put(EntityType.CAVE_SPIDER, new MobAspects(Sound.ENTITY_SPIDER_AMBIENT, Color.fromRGB(63, 37, 31))); 57 | m.put(EntityType.CREEPER, new MobAspects(Sound.ENTITY_CREEPER_PRIMED, Color.fromRGB(125, 255, 106))); 58 | m.put(EntityType.DROWNED, new MobAspects(Sound.ENTITY_DROWNED_AMBIENT, Color.fromRGB(109, 152, 144))); 59 | m.put(EntityType.ELDER_GUARDIAN, new MobAspects(Sound.ENTITY_ELDER_GUARDIAN_AMBIENT, Color.fromRGB(201, 143, 113))); 60 | m.put(EntityType.ENDERMAN, new MobAspects(Sound.ENTITY_ENDERMAN_AMBIENT, Color.fromRGB(0, 0, 0))); 61 | m.put(EntityType.ENDERMITE, new MobAspects(Sound.ENTITY_ENDERMITE_AMBIENT, Color.fromRGB(30, 30, 30))); 62 | m.put(EntityType.EVOKER, new MobAspects(Sound.ENTITY_EVOKER_AMBIENT, Color.fromRGB(144, 148, 148))); 63 | m.put(EntityType.GHAST, new MobAspects(Sound.ENTITY_GHAST_AMBIENT, Color.fromRGB(242, 242, 242))); 64 | m.put(EntityType.GUARDIAN, new MobAspects(Sound.ENTITY_GUARDIAN_AMBIENT, Color.fromRGB(201, 143, 113))); 65 | m.put(EntityType.HUSK, new MobAspects(Sound.ENTITY_HUSK_AMBIENT, Color.fromRGB(111, 104, 90))); 66 | m.put(EntityType.ILLUSIONER, new MobAspects(Sound.ENTITY_ILLUSIONER_AMBIENT, Color.fromRGB(144, 149, 149))); 67 | m.put(EntityType.PIGLIN, new MobAspects(Sound.ENTITY_PIGLIN_AMBIENT, Color.fromRGB(255, 215, 0))); 68 | m.put(EntityType.PIGLIN_BRUTE, new MobAspects(Sound.ENTITY_PIGLIN_BRUTE_AMBIENT, Color.fromRGB(255, 215, 0))); 69 | m.put(EntityType.ZOMBIFIED_PIGLIN, new MobAspects(Sound.ENTITY_ZOMBIFIED_PIGLIN_AMBIENT, Color.fromRGB(125, 100, 0))); 70 | m.put(EntityType.PILLAGER, new MobAspects(Sound.ENTITY_PILLAGER_AMBIENT, Color.fromRGB(74, 74, 53))); 71 | m.put(EntityType.RAVAGER, new MobAspects(Sound.ENTITY_RAVAGER_AMBIENT, Color.fromRGB(85, 78, 73))); 72 | m.put(EntityType.SHULKER, new MobAspects(Sound.ENTITY_SHULKER_AMBIENT, Color.fromRGB(142, 106, 146))); 73 | m.put(EntityType.SILVERFISH, new MobAspects(Sound.ENTITY_SILVERFISH_AMBIENT, Color.fromRGB(211, 211, 211))); 74 | m.put(EntityType.SKELETON, new MobAspects(Sound.ENTITY_SKELETON_AMBIENT, Color.fromRGB(211, 211, 211))); 75 | m.put(EntityType.SPIDER, new MobAspects(Sound.ENTITY_SPIDER_AMBIENT, Color.fromRGB(94, 84, 73))); 76 | m.put(EntityType.STRAY, new MobAspects(Sound.ENTITY_STRAY_AMBIENT, Color.fromRGB(118, 132, 135))); 77 | m.put(EntityType.VEX, new MobAspects(Sound.ENTITY_VEX_AMBIENT, Color.fromRGB(137, 156, 176))); 78 | m.put(EntityType.VINDICATOR, new MobAspects(Sound.ENTITY_VINDICATOR_AMBIENT, Color.fromRGB(137, 156, 166))); 79 | m.put(EntityType.WITCH, new MobAspects(Sound.ENTITY_WITCH_AMBIENT, Color.fromRGB(56, 39, 67))); 80 | m.put(EntityType.WITHER, new MobAspects(Sound.ENTITY_WITHER_AMBIENT, Color.fromRGB(80, 80, 80))); 81 | m.put(EntityType.WARDEN, new MobAspects(Sound.ENTITY_WARDEN_AMBIENT, Color.fromRGB(6, 72, 86))); //ADDED WARDEN SOUND 82 | m.put(EntityType.WITHER_SKELETON, new MobAspects(Sound.ENTITY_WITHER_SKELETON_AMBIENT, Color.fromRGB(100, 100, 100))); 83 | m.put(EntityType.ZOGLIN, new MobAspects(Sound.ENTITY_ZOGLIN_AMBIENT, Color.fromRGB(255, 192, 203))); 84 | m.put(EntityType.ZOMBIE, new MobAspects(Sound.ENTITY_ZOMBIE_AMBIENT, Color.fromRGB(74, 99, 53))); 85 | m.put(EntityType.ZOMBIE_VILLAGER, new MobAspects(Sound.ENTITY_ZOMBIE_VILLAGER_AMBIENT, Color.fromRGB(111, 104, 90))); 86 | 87 | MOB_ASPECTS = Collections.unmodifiableMap(m); 88 | 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/oneblocks/MobAspects.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.oneblocks; 2 | 3 | import org.bukkit.Color; 4 | import org.bukkit.Sound; 5 | 6 | /** 7 | * Defines a mob 8 | * @author tastybento 9 | * 10 | */ 11 | public record MobAspects(Sound sound, Color color) { } 12 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/oneblocks/OneBlockCustomBlock.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.oneblocks; 2 | 3 | import org.bukkit.block.Block; 4 | 5 | import world.bentobox.aoneblock.AOneBlock; 6 | 7 | /** 8 | * Represents a custom block with custom executable 9 | * 10 | * @author HSGamer 11 | */ 12 | public interface OneBlockCustomBlock { 13 | /** 14 | * Executes the custom logic 15 | * 16 | * @param block the block 17 | */ 18 | void execute(AOneBlock addon, Block block); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/oneblocks/OneBlockCustomBlockCreator.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.oneblocks; 2 | 3 | import java.util.ArrayList; 4 | import java.util.LinkedHashMap; 5 | import java.util.List; 6 | import java.util.Map; 7 | import java.util.Objects; 8 | import java.util.Optional; 9 | import java.util.function.Function; 10 | 11 | import world.bentobox.aoneblock.oneblocks.customblock.BlockDataCustomBlock; 12 | import world.bentobox.aoneblock.oneblocks.customblock.MobCustomBlock; 13 | 14 | /** 15 | * A creator for {@link OneBlockCustomBlock} 16 | * 17 | * @author HSGamer 18 | */ 19 | public final class OneBlockCustomBlockCreator { 20 | private static final Map, Optional>> creatorMap = new LinkedHashMap<>(); 21 | private static final List>> shortCreatorList = new ArrayList<>(); 22 | 23 | static { 24 | register("block-data", BlockDataCustomBlock::fromMap); 25 | register("mob", MobCustomBlock::fromMap); 26 | register("short", map -> { 27 | String type = Objects.toString(map.get("data"), null); 28 | if (type == null) { 29 | return Optional.empty(); 30 | } 31 | return create(type); 32 | }); 33 | } 34 | 35 | private OneBlockCustomBlockCreator() { 36 | // EMPTY 37 | } 38 | 39 | /** 40 | * Register a creator 41 | * 42 | * @param type the type 43 | * @param creator the creator 44 | */ 45 | public static void register(String type, Function, Optional> creator) { 46 | creatorMap.put(type, creator); 47 | } 48 | 49 | /** 50 | * Register a short creator 51 | * 52 | * @param creator the creator 53 | */ 54 | public static void register(Function> creator) { 55 | shortCreatorList.add(creator); 56 | } 57 | 58 | /** 59 | * Create a custom block from the map 60 | * 61 | * @param map the map 62 | * @return the custom block 63 | */ 64 | public static Optional create(Map map) { 65 | String type = Objects.toString(map.get("type"), null); 66 | if (type == null) { 67 | return Optional.empty(); 68 | } 69 | return Optional.ofNullable(creatorMap.get(type)).flatMap(builder -> builder.apply(map)); 70 | } 71 | 72 | /** 73 | * Create a custom block from the string value 74 | * 75 | * @param value the value 76 | * @return the custom block 77 | */ 78 | public static Optional create(String value) { 79 | for (Function> creator : shortCreatorList) { 80 | Optional customBlock = creator.apply(value); 81 | if (customBlock.isPresent()) { 82 | return Optional.of(customBlock.get()); 83 | } 84 | } 85 | return Optional.empty(); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/oneblocks/OneBlockObject.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.oneblocks; 2 | 3 | import java.util.Map; 4 | 5 | import org.bukkit.Material; 6 | import org.bukkit.entity.EntityType; 7 | import org.bukkit.inventory.ItemStack; 8 | 9 | /** 10 | * Represents something that can be generated when a block is broken 11 | * Can be a block or entity 12 | * 13 | * @author tastybento 14 | */ 15 | public class OneBlockObject { 16 | 17 | public enum Rarity { 18 | /** 19 | * Applies to most items. 20 | */ 21 | COMMON, 22 | /** 23 | * Mostly common treasure items, as well as drops from minor bosses. 24 | * e.g. banner patterns, Exp bottle, potions, elytra, enchanted books, heads 25 | * heart of the sea, nether star, totem of undying 26 | */ 27 | UNCOMMON, 28 | /** 29 | * Items crafted from boss drops, as well as trickier to obtain treasures. 30 | * Beacon, conduit, enchanted armor, golden apple, music discs 31 | */ 32 | RARE, 33 | /** 34 | * Mostly reserved for extremely difficult-to-obtain treasures. 35 | * Enchanted golden apple, creative-exclusive items 36 | */ 37 | EPIC 38 | } 39 | 40 | private EntityType entityType; 41 | private Material material; 42 | private Map chest; 43 | private Rarity rarity; 44 | private OneBlockCustomBlock customBlock; 45 | private int prob; 46 | 47 | /** 48 | * An entity 49 | * 50 | * @param entityType - type 51 | * @param prob - relative probability 52 | */ 53 | public OneBlockObject(EntityType entityType, int prob) { 54 | this.entityType = entityType; 55 | this.prob = prob; 56 | } 57 | 58 | /** 59 | * A block 60 | * 61 | * @param material - block type 62 | * @param prob - relative probability 63 | */ 64 | public OneBlockObject(Material material, int prob) { 65 | this.material = material; 66 | this.prob = prob; 67 | } 68 | 69 | /** 70 | * A custom block 71 | * 72 | * @param customBlock - custom block 73 | * @param prob - relative probability 74 | */ 75 | public OneBlockObject(OneBlockCustomBlock customBlock, int prob) { 76 | this.customBlock = customBlock; 77 | this.prob = prob; 78 | } 79 | 80 | /** 81 | * A chest 82 | * 83 | * @param chest - list of itemstacks in the chest 84 | */ 85 | public OneBlockObject(Map chest, Rarity rarity) { 86 | this.material = Material.CHEST; 87 | this.chest = chest; 88 | this.setRarity(rarity); 89 | } 90 | 91 | /** 92 | * Copy constructor 93 | * 94 | * @param ob - OneBlockObject 95 | */ 96 | public OneBlockObject(OneBlockObject ob) { 97 | this.chest = ob.getChest(); 98 | this.entityType = ob.getEntityType(); 99 | this.material = ob.getMaterial(); 100 | this.rarity = ob.getRarity(); 101 | this.prob = ob.getProb(); 102 | this.customBlock = ob.getCustomBlock(); 103 | } 104 | 105 | /** 106 | * @return the entityType 107 | */ 108 | public EntityType getEntityType() { 109 | return entityType; 110 | } 111 | 112 | 113 | /** 114 | * @return the material 115 | */ 116 | public Material getMaterial() { 117 | return material; 118 | } 119 | 120 | 121 | /** 122 | * @return the inventory 123 | */ 124 | public Map getChest() { 125 | return chest; 126 | } 127 | 128 | 129 | /** 130 | * @return the customBlock 131 | */ 132 | public OneBlockCustomBlock getCustomBlock() { 133 | return customBlock; 134 | } 135 | 136 | 137 | /** 138 | * @return the isMaterial 139 | */ 140 | public boolean isMaterial() { 141 | return material != null; 142 | } 143 | 144 | 145 | /** 146 | * @return the isEntity 147 | */ 148 | public boolean isEntity() { 149 | return entityType != null; 150 | } 151 | 152 | 153 | /** 154 | * @return the isCustomBlock 155 | */ 156 | public boolean isCustomBlock() { 157 | return customBlock != null; 158 | } 159 | 160 | /** 161 | * @return the rarity 162 | */ 163 | public Rarity getRarity() { 164 | return rarity == null ? Rarity.COMMON : rarity; 165 | } 166 | 167 | /** 168 | * @param rarity the rarity to set 169 | */ 170 | public void setRarity(Rarity rarity) { 171 | this.rarity = rarity; 172 | } 173 | 174 | /** 175 | * @return the prob 176 | */ 177 | public int getProb() { 178 | return prob; 179 | } 180 | 181 | /** 182 | * @param prob the prob to set 183 | */ 184 | public void setProb(int prob) { 185 | this.prob = prob; 186 | } 187 | 188 | /* (non-Javadoc) 189 | * @see java.lang.Object#toString() 190 | */ 191 | @Override 192 | public String toString() { 193 | return "OneBlockObject [" + (entityType != null ? "entityType=" + entityType + ", " : "") 194 | + (material != null ? "material=" + material + ", " : "") 195 | + (chest != null ? "chest=" + chest + ", " : "") + (rarity != null ? "rarity=" + rarity + ", " : "") 196 | + (customBlock != null ? "customBlock=" + customBlock + ", " : "") 197 | + "prob=" + prob + "]"; 198 | } 199 | 200 | } 201 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/oneblocks/Requirement.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.oneblocks; 2 | 3 | /** 4 | * Requirement for finishing a phase 5 | * @author tastybento 6 | * 7 | */ 8 | public record Requirement(ReqType type, Object requirement) { 9 | /** 10 | * Requirement type enum 11 | * 12 | */ 13 | public enum ReqType { 14 | /** 15 | * Economy balance 16 | */ 17 | ECO("economy-balance", Double.class), 18 | /** 19 | * Bank Balance 20 | */ 21 | BANK("bank-balance", Double.class), 22 | /** 23 | * Island Level 24 | */ 25 | LEVEL("level", Long.class), 26 | /** 27 | * Permission 28 | */ 29 | PERMISSION("permission", String.class), 30 | /** 31 | * Cooldown 32 | */ 33 | COOLDOWN("cooldown", Long.class); 34 | 35 | private final String key; 36 | private final Class clazz; 37 | 38 | ReqType(String string, Class class1) { 39 | this.key = string; 40 | this.clazz = class1; 41 | } 42 | 43 | /** 44 | * @return the key 45 | */ 46 | public String getKey() { 47 | return key; 48 | } 49 | 50 | /** 51 | * @return the clazz 52 | */ 53 | public Class getClazz() { 54 | return clazz; 55 | } 56 | } 57 | 58 | /** 59 | * @return the bank balance req 60 | */ 61 | public double getBank() { 62 | return (double)requirement; 63 | } 64 | 65 | /** 66 | * @return the economy balance req 67 | */ 68 | public double getEco() { 69 | return (double)requirement; 70 | } 71 | 72 | /** 73 | * @return the level 74 | */ 75 | public long getLevel() { 76 | return (long)requirement; 77 | } 78 | 79 | /** 80 | * @return the permission 81 | */ 82 | public String getPermission() { 83 | return (String)requirement; 84 | } 85 | 86 | /** 87 | * @return the cooldown 88 | */ 89 | public long getCooldown() { 90 | return (long)requirement; 91 | } 92 | 93 | /** 94 | * @return the type 95 | */ 96 | public ReqType getType() { 97 | return type; 98 | } 99 | 100 | 101 | 102 | } 103 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/oneblocks/customblock/BlockDataCustomBlock.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.oneblocks.customblock; 2 | 3 | import java.util.Map; 4 | import java.util.Objects; 5 | import java.util.Optional; 6 | 7 | import org.bukkit.Bukkit; 8 | import org.bukkit.block.Block; 9 | 10 | import world.bentobox.aoneblock.AOneBlock; 11 | import world.bentobox.aoneblock.oneblocks.OneBlockCustomBlock; 12 | import world.bentobox.bentobox.BentoBox; 13 | 14 | /** 15 | * A custom block that is defined by a block data value. 16 | * 17 | * @author HSGamer 18 | */ 19 | public class BlockDataCustomBlock implements OneBlockCustomBlock { 20 | private final String blockData; 21 | 22 | public BlockDataCustomBlock(String blockData) { 23 | this.blockData = blockData; 24 | } 25 | 26 | public static Optional fromMap(Map map) { 27 | String type = Objects.toString(map.get("data"), null); 28 | if (type == null) { 29 | return Optional.empty(); 30 | } 31 | return Optional.of(new BlockDataCustomBlock(type)); 32 | } 33 | 34 | @Override 35 | public void execute(AOneBlock addon, Block block) { 36 | try { 37 | block.setBlockData(Bukkit.createBlockData(blockData)); 38 | } catch (IllegalArgumentException e) { 39 | try { 40 | // Try and place it 41 | String world = "minecraft:" + block.getLocation().getWorld().getName(); 42 | String x = String.valueOf(block.getLocation().getBlockX()); 43 | String y = String.valueOf(block.getLocation().getBlockY()); 44 | String z = String.valueOf(block.getLocation().getBlockZ()); 45 | Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "execute in " + world + " run setblock " + x + " " + y + " " + z + " " + blockData); 46 | } catch (Exception e2) { 47 | BentoBox.getInstance().logError("Could not set block data " + blockData + " for block " + block.getType()); 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/oneblocks/customblock/ItemsAdderCustomBlock.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.oneblocks.customblock; 2 | 3 | import java.util.Map; 4 | import java.util.Objects; 5 | import java.util.Optional; 6 | 7 | import org.bukkit.Material; 8 | import org.bukkit.block.Block; 9 | 10 | import dev.lone.itemsadder.api.CustomBlock; 11 | import world.bentobox.aoneblock.AOneBlock; 12 | import world.bentobox.aoneblock.oneblocks.OneBlockCustomBlock; 13 | import world.bentobox.bentobox.BentoBox; 14 | 15 | public class ItemsAdderCustomBlock implements OneBlockCustomBlock { 16 | private final CustomBlock customBlock; 17 | 18 | public ItemsAdderCustomBlock(CustomBlock customBlock) { 19 | this.customBlock = customBlock; 20 | } 21 | 22 | public static Optional fromId(String id) { 23 | return Optional.ofNullable(CustomBlock.getInstance(id)).map(ItemsAdderCustomBlock::new); 24 | } 25 | 26 | public static Optional fromMap(Map map) { 27 | return Optional 28 | .ofNullable(Objects.toString(map.get("id"), null)) 29 | .flatMap(ItemsAdderCustomBlock::fromId); 30 | } 31 | 32 | @Override 33 | public void execute(AOneBlock addon, Block block) { 34 | try { 35 | block.setType(Material.AIR); 36 | customBlock.place(block.getLocation()); 37 | } catch (Exception e) { 38 | BentoBox.getInstance().logError("Could not place custom block " + customBlock.getId() + " for block " + block.getType()); 39 | block.setType(Material.STONE); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/oneblocks/customblock/MobCustomBlock.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.oneblocks.customblock; 2 | 3 | import java.util.Locale; 4 | import java.util.Map; 5 | import java.util.Objects; 6 | import java.util.Optional; 7 | 8 | import org.bukkit.Location; 9 | import org.bukkit.Material; 10 | import org.bukkit.Sound; 11 | import org.bukkit.block.Block; 12 | import org.bukkit.entity.Entity; 13 | import org.bukkit.entity.EntityType; 14 | import org.bukkit.util.Vector; 15 | import org.eclipse.jdt.annotation.NonNull; 16 | 17 | import com.google.common.base.Enums; 18 | 19 | import world.bentobox.aoneblock.AOneBlock; 20 | import world.bentobox.aoneblock.listeners.MakeSpace; 21 | import world.bentobox.aoneblock.oneblocks.OneBlockCustomBlock; 22 | import world.bentobox.bentobox.BentoBox; 23 | 24 | /** 25 | * A custom block that spawns mob on an underlying block 26 | * 27 | * @author Baterka 28 | */ 29 | public class MobCustomBlock implements OneBlockCustomBlock { 30 | private final EntityType mob; 31 | private final Material underlyingBlock; 32 | 33 | public MobCustomBlock(EntityType mob, Material underlyingBlock) { 34 | this.mob = mob; 35 | this.underlyingBlock = underlyingBlock; 36 | } 37 | 38 | public static Optional fromMap(Map map) { 39 | String entityTypeValue = Objects.toString(map.get("mob"), null); 40 | String underlyingBlockValue = Objects.toString(map.get("underlying-block"), null); 41 | 42 | EntityType entityType = maybeEntity(entityTypeValue); 43 | Material underlyingBlock = Material.getMaterial(underlyingBlockValue); 44 | 45 | if (underlyingBlock == null) { 46 | BentoBox.getInstance().logWarning("Underlying block " + underlyingBlockValue + " does not exist and will be replaced with STONE."); 47 | } 48 | 49 | return Optional.of(new MobCustomBlock(entityType, underlyingBlock)); 50 | } 51 | 52 | private static EntityType maybeEntity(String entityTypeValue) { 53 | String name = entityTypeValue.toUpperCase(Locale.ENGLISH); 54 | EntityType et; 55 | 56 | // Pig zombie handling 57 | if (name.equals("PIG_ZOMBIE") || name.equals("ZOMBIFIED_PIGLIN")) { 58 | et = Enums.getIfPresent(EntityType.class, "ZOMBIFIED_PIGLIN") 59 | .or(Enums.getIfPresent(EntityType.class, "PIG_ZOMBIE").or(EntityType.PIG)); 60 | } else { 61 | et = Enums.getIfPresent(EntityType.class, name).orNull(); 62 | } 63 | 64 | if (et == null) { 65 | // Does not exist 66 | BentoBox.getInstance().logWarning("Entity " + name + " does not exist and will not spawn when block is shown."); 67 | return null; 68 | } 69 | if (et.isSpawnable() && et.isAlive()) { 70 | return et; 71 | } else { 72 | // Not spawnable 73 | BentoBox.getInstance().logWarning("Entity " + et.name() + " is not spawnable and will not spawn when block is shown."); 74 | return null; 75 | } 76 | } 77 | 78 | @Override 79 | public void execute(AOneBlock addon, Block block) { 80 | try { 81 | block.setType(Objects.requireNonNullElse(underlyingBlock, Material.STONE)); 82 | spawnEntity(addon, block, mob); 83 | } catch (Exception e) { 84 | BentoBox.getInstance().logError("Could not spawn entity " + mob.name() + " on block " + block.getType()); 85 | } 86 | } 87 | 88 | private void spawnEntity(AOneBlock addon, @NonNull Block block, @NonNull EntityType mob) { 89 | Location spawnLoc = block.getLocation().add(new Vector(0.5D, 1D, 0.5D)); 90 | Entity entity = block.getWorld().spawnEntity(spawnLoc, mob); 91 | // Make space for entity - this will blot out blocks 92 | if (addon.getSettings().isClearBlocks()) { 93 | new MakeSpace(addon).makeSpace(entity, spawnLoc); 94 | } 95 | block.getWorld().playSound(block.getLocation(), Sound.ENTITY_ENDERMAN_TELEPORT, 1F, 2F); 96 | } 97 | 98 | public EntityType getMob() { 99 | return mob; 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/requests/IslandStatsHandler.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.requests; 2 | 3 | import java.util.Collections; 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | import java.util.UUID; 7 | 8 | import world.bentobox.aoneblock.AOneBlock; 9 | import world.bentobox.bentobox.api.addons.request.AddonRequestHandler; 10 | import world.bentobox.bentobox.api.user.User; 11 | 12 | /** 13 | * Provides stats on the player's island.
14 | * Submit "player" -> UUID to {@link #handle(Map)}.
15 | * Return map is a {@code Map} of the following: 16 | *
  • "count" - block count of island
  • 17 | *
  • "doneScale" - character scale of phase completion
  • 18 | *
  • "nextPhaseBlocks" - number of blocks to next phase
  • 19 | *
  • "nextPhase" - next phase name
  • 20 | *
  • "percentDone" - percentage done of this phase
  • 21 | *
  • "phase" - current phase name
22 | * @author tastybento 23 | * 24 | */ 25 | public class IslandStatsHandler extends AddonRequestHandler { 26 | 27 | private final AOneBlock addon; 28 | private static final Object PLAYER = "player"; 29 | 30 | public IslandStatsHandler(AOneBlock addon) { 31 | super("island-stats"); 32 | this.addon = addon; 33 | } 34 | 35 | /* (non-Javadoc) 36 | * @see world.bentobox.bentobox.api.addons.request.AddonRequestHandler#handle(java.util.Map) 37 | */ 38 | @Override 39 | public Object handle(Map map) { 40 | /* 41 | What we need in the map: 42 | "player" -> UUID 43 | 44 | What we will return: 45 | - empty map if UUID is invalid 46 | - a map of island stats: 47 | 48 | "count" - block count of island 49 | "doneScale" - character scale of phase completion 50 | "nextPhaseBlocks" - number of blocks to next phase 51 | "nextPhase" - next phase name 52 | "percentDone" - percentage done of this phase 53 | "phase" - current phase name 54 | */ 55 | 56 | if (map == null || map.isEmpty() || map.get(PLAYER) == null || !(map.get(PLAYER) instanceof UUID)) { 57 | return Collections.emptyMap(); 58 | } 59 | 60 | User user = User.getInstance((UUID)map.get(PLAYER)); 61 | // No null check required 62 | Map result = new HashMap<>(); 63 | result.put("count", addon.getPlaceholdersManager().getCount(user)); 64 | result.put("doneScale", addon.getPlaceholdersManager().getDoneScale(user)); 65 | result.put("nextPhaseBlocks", addon.getPlaceholdersManager().getNextPhaseBlocks(user)); 66 | result.put("nextPhase", addon.getPlaceholdersManager().getNextPhase(user)); 67 | result.put("percentDone", addon.getPlaceholdersManager().getPercentDone(user)); 68 | result.put("phase", addon.getPlaceholdersManager().getPhase(user)); 69 | return result; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/world/bentobox/aoneblock/requests/LocationStatsHandler.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.requests; 2 | 3 | import java.util.Collections; 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | import java.util.UUID; 7 | 8 | import world.bentobox.aoneblock.AOneBlock; 9 | import world.bentobox.bentobox.api.addons.request.AddonRequestHandler; 10 | import world.bentobox.bentobox.api.user.User; 11 | 12 | /** 13 | * Provides stats based on the user's location.
14 | * Submit "player" -> UUID to {@link #handle(Map)}.
15 | * Return map is a {@code Map} of the following: 16 | *
  • "count" - block count of island
  • 17 | *
  • "doneScale" - character scale of phase completion
  • 18 | *
  • "nextPhaseBlocks" - number of blocks to next phase
  • 19 | *
  • "nextPhase" - next phase name
  • 20 | *
  • "percentDone" - percentage done of this phase
  • 21 | *
  • "phase" - current phase name
22 | * @author tastybento 23 | * 24 | */ 25 | public class LocationStatsHandler extends AddonRequestHandler { 26 | 27 | private final AOneBlock addon; 28 | private static final Object PLAYER = "player"; 29 | 30 | public LocationStatsHandler(AOneBlock addon) { 31 | super("location-stats"); 32 | this.addon = addon; 33 | } 34 | 35 | /* (non-Javadoc) 36 | * @see world.bentobox.bentobox.api.addons.request.AddonRequestHandler#handle(java.util.Map) 37 | */ 38 | @Override 39 | public Object handle(Map map) { 40 | /* 41 | What we need in the map: 42 | "player" -> UUID 43 | 44 | What we will return: 45 | - empty map if UUID is invalid or player is offline 46 | - a map of island stats: 47 | 48 | "count" - block count of island 49 | "doneScale" - character scale of phase completion 50 | "nextPhaseBlocks" - number of blocks to next phase 51 | "nextPhase" - next phase name 52 | "percentDone" - percentage done of this phase 53 | "phase" - current phase name 54 | 55 | 56 | */ 57 | 58 | if (map == null || map.isEmpty() || map.get(PLAYER) == null || !(map.get(PLAYER) instanceof UUID)) { 59 | return Collections.emptyMap(); 60 | } 61 | 62 | User user = User.getInstance((UUID)map.get(PLAYER)); 63 | if (user == null || !user.isOnline()) { 64 | return Collections.emptyMap(); 65 | } 66 | // No null check required 67 | Map result = new HashMap<>(); 68 | result.put("count", addon.getPlaceholdersManager().getCountByLocation(user)); 69 | result.put("doneScale", addon.getPlaceholdersManager().getDoneScaleByLocation(user)); 70 | result.put("nextPhaseBlocks", addon.getPlaceholdersManager().getNextPhaseBlocksByLocation(user)); 71 | result.put("nextPhase", addon.getPlaceholdersManager().getNextPhaseByLocation(user)); 72 | result.put("percentDone", addon.getPlaceholdersManager().getPercentDoneByLocation(user)); 73 | result.put("phase", addon.getPlaceholdersManager().getPhaseByLocation(user)); 74 | return result; 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/main/resources/blueprints/bedrock.blu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BentoBoxWorld/AOneBlock/049383d263ddfdb734528077b4dda70b35a455ca/src/main/resources/blueprints/bedrock.blu -------------------------------------------------------------------------------- /src/main/resources/blueprints/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "uniqueId": "default", 3 | "icon": "PAPER", 4 | "displayName": "Default bundle", 5 | "description": [ 6 | "§bDefault bundle of blueprints" 7 | ], 8 | "requirePermission": false, 9 | "blueprints": { 10 | "NORMAL": "bedrock", 11 | "NETHER": "bedrock", 12 | "THE_END": "bedrock" 13 | }, 14 | "slot": 0 15 | } -------------------------------------------------------------------------------- /src/main/resources/locales/cs.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Počáteční bezpečnost 5 | description: | 6 | &b Zabraňuje novým hráčům 7 | &b from moving for 1 minute 8 | &b takže nespadnou. 9 | hint: '&c pohyb zablokován pro bezpečnost po [number] více sekund!' 10 | free-to-move: '&a Můžete se volně pohybovat. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Boss Bar 13 | description: | 14 | &b Ukazuje stavový řádek 15 | &b pro každou fázi. 16 | aoneblock: 17 | bossbar: 18 | title: Bloky zbývající 19 | status: '&a Fázové bloky & B [done] & d / & b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss Bar není pro tento ostrov aktivní' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: [lifetime] 27 | description: nastavit počet bloků hráče 28 | set: '&a počet [name] je nastaven na [number]' 29 | set-lifetime: '&a [name] je nastaveno na [number]' 30 | setchest: 31 | parameters: 32 | description: dejte pohled na hrudník do fáze se specifikovanou vzácností 33 | chest-is-empty: '&c Ten hrudník je prázdný, takže jej nelze přidat' 34 | unknown-phase: '&c Neznámá fáze. Chcete-li si je prohlédnout, použijte tabulátor' 35 | unknown-rarity: '&c Neznámá vzácnost. Používejte COMMON, UNCOMMON, RARE nebo EPIC' 36 | look-at-chest: '&c Podívejte se na naplněnou hruď a nastavte ji' 37 | only-single-chest: '&c Lze nastavit pouze jednotlivé bedny' 38 | success: '&a Hrudník byl úspěšně přidán do fáze' 39 | failure: '&c Hrudník nelze přidat do fáze! Chyby najdete na konzole' 40 | sanity: 41 | parameters: 42 | description: zobrazí v konzoli kontrolu pravděpodobnosti fází 43 | see-console: '&a Podívejte se do konzoly pro zprávu' 44 | count: 45 | description: zobrazit počet bloků a fázi 46 | info: '&a Jste na bloku &b [number] ve fázi &a [name]' 47 | info: 48 | count: >- 49 | Ostrov &a je na bloku &b [number]&a ve fázi &b [name] &a. Počet doživotí 50 | &b [lifetime] &a. 51 | phases: 52 | description: zobrazit seznam všech fází 53 | title: '&2 Fáze OneBlock' 54 | name-syntax: '&a [name]' 55 | description-syntax: '&b [number] bloků' 56 | island: 57 | bossbar: 58 | description: přepíná fázový šéfový bar 59 | status_on: '&b Bossbar se otočil &a zapnul' 60 | status_off: '&b Bossbar se &c otočil' 61 | setcount: 62 | parameters: 63 | description: nastavte počet bloků na dříve dokončenou hodnotu 64 | set: '&a Počet nastaven na [number].' 65 | too-high: '&c Maximálně můžeš nastavit [number]!' 66 | respawn-block: 67 | description: respawnuje magický blok v situacích, kdy zmizí 68 | block-exist: '&a Blok existuje, nevyžadoval respawning. Označil jsem to za vás.' 69 | block-respawned: '&a Blok byl znovu vytvořen.' 70 | phase: 71 | insufficient-level: Tvůj ostrov je na příliš nízké úrovni, musí být alespoň [number]. 72 | insufficient-funds: Nemáš dostatečné prostředky! Musíš mít alespoň [number]. 73 | insufficient-bank-balance: V Bance ostrova není dostatek financí! Je potřeba alespoň [number]. 74 | insufficient-permission: '&c Nemůžete pokračovat, dokud nezískáte oprávnění [name]!' 75 | cooldown: '&c Další fáze bude dostupná za [number] sekund!' 76 | placeholders: 77 | infinite: Nekonečný 78 | gui: 79 | titles: 80 | phases: '&0&l Jednoblokové fáze' 81 | buttons: 82 | previous: 83 | name: '&f&l Předchozí stránka' 84 | description: '&7 Přepnout na stránku [number]' 85 | next: 86 | name: '&f&l Další stránka' 87 | description: '&7 Přepnout na stránku [number]' 88 | phase: 89 | name: '&f&l [phase]' 90 | description: |- 91 | [starting-block] 92 | [biome] 93 | [bank] 94 | [economy] 95 | [level] 96 | [permission] 97 | starting-block: '&7 Spustí se po rozbití bloků &e [number].' 98 | biome: '&7 Biom: &e [biome]' 99 | bank: '&7 Vyžaduje &e $[number] &7 na bankovním účtu.' 100 | economy: '&7 Vyžaduje &e $[number] &7 v hráčském účtu.' 101 | level: '&7 Vyžaduje &e [number] &7 úroveň ostrova.' 102 | permission: '&7 Vyžaduje oprávnění `&e[permission]&7`.' 103 | blocks-prefix: '&7 Bloků ve fázi -' 104 | blocks: '&e [name], ' 105 | wrap-at: '50' 106 | tips: 107 | click-to-previous: '&e Klepnutím na &7 zobrazíte předchozí stránku.' 108 | click-to-next: '&e Klepnutím na &7 zobrazíte další stránku.' 109 | click-to-change: '&e Klikněte na &7 pro změnu.' 110 | island: 111 | starting-hologram: |- 112 | &a Vítejte v AOneBlock 113 | &e Prolomte tento blok 114 | -------------------------------------------------------------------------------- /src/main/resources/locales/de.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Sicherheit beginnen 5 | description: | 6 | &b verhindert neue Spieler 7 | &b vor dem Umzug für 1 Minute 8 | &b damit sie nicht abfallen. 9 | hint: '&c Bewegung für die Sicherheit für [number] mehr Sekunden!' 10 | free-to-move: '&a Sie können sich frei bewegen. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Boss Bar 13 | description: | 14 | &b Zeigt eine Statusleiste 15 | &b für jede Phase. 16 | aoneblock: 17 | bossbar: 18 | title: Verbleibende Blöcke 19 | status: '&a Phasenblöcke &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss Bar ist für diese Insel nicht aktiv' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: [lifetime] 27 | description: Setze die Blockanzahl des Spielers 28 | set: '&a [name] zählt auf [number]' 29 | set-lifetime: Die Lebenszeitanzahl von &a [name] wurde auf [number] gesetzt 30 | setchest: 31 | parameters: 32 | description: >- 33 | Versetzen Sie die betrachtete Truhe in eine Phase mit der angegebenen 34 | Seltenheit 35 | chest-is-empty: '&c Diese Truhe ist leer und kann daher nicht hinzugefügt werden' 36 | unknown-phase: '&c Unbekannte Phase. Verwenden Sie tab-complete, um sie anzuzeigen' 37 | unknown-rarity: >- 38 | &c Unbekannte Seltenheit. Verwenden Sie COMMON, UNCOMMON, RARE oder 39 | EPIC 40 | look-at-chest: '&c Sieh dir eine gefüllte Truhe an, um sie einzustellen' 41 | only-single-chest: '&c Es können nur einzelne Truhen eingestellt werden' 42 | success: '&a Eine Truhe erfolgreich zur Phase hinzugefügt' 43 | failure: >- 44 | &c Truhe konnte nicht zur Phase hinzugefügt werden! Siehe Konsole für 45 | Fehler 46 | sanity: 47 | parameters: 48 | description: >- 49 | Zeigen Sie eine Überprüfung der Phasenwahrscheinlichkeiten in der 50 | Konsole an 51 | see-console: '&a Den Bericht finden Sie in der Konsole' 52 | count: 53 | description: Zeige die Blockanzahl und Phase 54 | info: '&a Sie befinden sich in der Phase &a [name] in Block &b [number]' 55 | info: 56 | count: >- 57 | &a Island befindet sich in Block &b [number]&a in der Phase &b [Name] 58 | &a. Lebenszeitanzahl &b [lifetime] &a. 59 | phases: 60 | description: Zeigen Sie eine Liste aller Phasen an 61 | title: '&2 OneBlock-Phasen' 62 | name-syntax: '&a [name]' 63 | description-syntax: '&b [number] Blöcke' 64 | island: 65 | bossbar: 66 | description: Phase Boss Bar umschalten 67 | status_on: '&b Bossbar &a eingeschaltet' 68 | status_off: '&b Bossbar &c ausgeschaltet' 69 | setcount: 70 | parameters: 71 | description: Setzen Sie die Blockanzahl auf den zuvor abgeschlossenen Wert 72 | set: '&a Zähler auf [number] gesetzt.' 73 | too-high: '&c Das Maximum, das Sie festlegen können, ist [number]!' 74 | respawn-block: 75 | description: >- 76 | lässt den magischen Block in Situationen wieder erscheinen, in denen er 77 | verschwindet 78 | block-exist: >- 79 | &ein Block existiert, musste nicht neu gestartet werden. Ich habe es für 80 | dich markiert. 81 | block-respawned: '&a Block wieder aufgetaucht.' 82 | phase: 83 | insufficient-level: '&c Ihr Insellevel ist zu niedrig, um fortzufahren! Es muss [number] sein.' 84 | insufficient-funds: '&c Ihr Guthaben ist zu gering, um fortzufahren! Sie müssen [number] sein.' 85 | insufficient-bank-balance: >- 86 | &c Der Saldo der Inselbank ist zu niedrig, um fortzufahren! Es muss 87 | [number] sein. 88 | insufficient-permission: >- 89 | &c Sie können nicht weitermachen, bis Sie die [name]-Berechtigung 90 | erhalten! 91 | cooldown: '&c Die nächste Stufe ist in [number] Sekunden verfügbar!' 92 | placeholders: 93 | infinite: Unendlich 94 | gui: 95 | titles: 96 | phases: '&0&l OneBlock-Phasen' 97 | buttons: 98 | previous: 99 | name: '&f&l Vorherige Seite' 100 | description: '&7 Zur Seite [number] wechseln' 101 | next: 102 | name: '&f&l Nächste Seite' 103 | description: '&7 Zur Seite [number] wechseln' 104 | phase: 105 | name: '&f&l [phase]' 106 | description: |- 107 | [starting-block] 108 | [biome] 109 | [bank] 110 | [economy] 111 | [level] 112 | [permission] 113 | starting-block: '&7 Startet nach dem Aufbrechen von &e [number] Blöcken.' 114 | biome: '&7 Biom: &e [biome]' 115 | bank: '&7 Erfordert &e $[number] &7 auf dem Bankkonto.' 116 | economy: '&7 Erfordert &e $[number] &7 im Spielerkonto.' 117 | level: '&7 Erfordert &e [number] &7 Inselebene.' 118 | permission: '&7 Erfordert die Berechtigung „&e[permission]&7“.' 119 | blocks-prefix: '&7 Blöcke in Phase -' 120 | blocks: '&e [name], ' 121 | wrap-at: '50' 122 | tips: 123 | click-to-previous: '&e Klicken Sie auf &7, um die vorherige Seite anzuzeigen.' 124 | click-to-next: '&e Klicken Sie auf &7, um die nächste Seite anzuzeigen.' 125 | click-to-change: '&e Zum Ändern &7klicken.' 126 | island: 127 | starting-hologram: |- 128 | &aWillkommen bei AOneBlock 129 | &eBrechen Sie diesen Block, 130 | &eum zu beginnen 131 | -------------------------------------------------------------------------------- /src/main/resources/locales/en-US.yml: -------------------------------------------------------------------------------- 1 | ########################################################################################### 2 | # This is a YML file. Be careful when editing. Check your edits in a YAML checker like # 3 | # the one at http://yaml-online-parser.appspot.com # 4 | ########################################################################################### 5 | 6 | protection: 7 | flags: 8 | START_SAFETY: 9 | name: Starting Safety 10 | description: | 11 | &b Prevents new players 12 | &b from moving for 1 minute 13 | &b so they don't fall off. 14 | hint: "&c Movement blocked for safety for [number] more seconds!" 15 | free-to-move: "&a You are free to move. Be careful!" 16 | ONEBLOCK_BOSSBAR: 17 | name: Boss Bar 18 | description: | 19 | &b Shows a status bar 20 | &b for each phase. 21 | aoneblock: 22 | bossbar: 23 | title: "Blocks remaining" 24 | # status: "&a Phase blocks &b [total]. Blocks left: [todo]" 25 | # status: "&a [phase-name] : [percent-done]" 26 | status: "&a Phase blocks &b [done] &d / &b [total]" 27 | # RED, WHITE, PINK, BLUE, GREEN, YELLOW, or PURPLE 28 | color: RED 29 | # SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20 30 | style: SOLID 31 | not-active: "&c Boss Bar is not active for this island" 32 | commands: 33 | admin: 34 | setcount: 35 | parameters: " [lifetime]" 36 | description: "set player's block count" 37 | set: "&a [name]'s count set to [number]" 38 | set-lifetime: "&a [name]'s lifetime count set to [number]" 39 | setchest: 40 | parameters: " " 41 | description: "put the looked-at chest in a phase with the rarity specified" 42 | chest-is-empty: "&c That chest is empty so cannot be added" 43 | unknown-phase: "&c Unknown phase. Use tab-complete to see them" 44 | unknown-rarity: "&c Unknown rarity. Use COMMON, UNCOMMON, RARE or EPIC" 45 | look-at-chest: "&c Look at a filled chest to set it" 46 | only-single-chest: "&c Only single chests can be set" 47 | success: "&a Chest successfully added to phase" 48 | failure: "&c Chest could not be added to the phase! See console for errors" 49 | sanity: 50 | parameters: "" 51 | description: "display a sanity check of the phase probabilities in the console" 52 | see-console: "&a See the console for the report" 53 | count: 54 | description: show the block count and phase 55 | info: "&a You are on block &b [number] in the &a [name] phase" 56 | info: 57 | count: "&a Island is on block &b [number] &a in the &b [name] &a phase. Lifetime count &b [lifetime] &a." 58 | phases: 59 | description: show a list of all the phases 60 | title: "&2 OneBlock Phases" 61 | name-syntax: "&a [name]" 62 | description-syntax: "&b [number] blocks" 63 | island: 64 | bossbar: 65 | description: "toggles phase boss bar" 66 | status_on: "&b Bossbar turned &a on" 67 | status_off: "&b Bossbar turned &c off" 68 | setcount: 69 | parameters: "" 70 | description: "set block count to previously completed value" 71 | set: "&a Count set to [number]." 72 | too-high: "&c The maximum you can set is [number]!" 73 | respawn-block: 74 | description: "respawns magic block in situations when it disappears" 75 | block-exist: "&a Block exists, did not require respawning. I marked it for you." 76 | block-respawned: "&a Block respawned." 77 | phase: 78 | insufficient-level: "&c Your island level is too low to proceed! It must be [number]." 79 | insufficient-funds: "&c Your funds are too low to proceed! They must be [number]." 80 | insufficient-bank-balance: "&c The island bank balance is too low to proceed! It must be [number]." 81 | insufficient-permission: "&c You can proceed no further until you obtain the [name] permission!" 82 | cooldown: "&c Next phase will be available in [number] seconds!" 83 | placeholders: 84 | infinite: Infinite 85 | gui: 86 | titles: 87 | phases: '&0&l OneBlock Phases' 88 | # This section contains all button names and lore (description) 89 | buttons: 90 | # List of buttons in GUI's 91 | # Button that is used in multi-page GUIs which allows to return to previous page. 92 | previous: 93 | name: "&f&l Previous Page" 94 | description: |- 95 | &7 Switch to [number] page 96 | # Button that is used in multi-page GUIs which allows to go to next page. 97 | next: 98 | name: "&f&l Next Page" 99 | description: |- 100 | &7 Switch to [number] page 101 | phase: 102 | name: "&f&l [phase]" 103 | description: |- 104 | [starting-block] 105 | [biome] 106 | [bank] 107 | [economy] 108 | [level] 109 | [permission] 110 | [blocks] 111 | # Replaces text with [starting-block] 112 | starting-block: "&7 Starts after breaking &e [number] blocks." 113 | # Replaces text with [biome] 114 | biome: "&7 Biome: &e [biome]" 115 | # Replaces text with [bank] 116 | bank: "&7 Requires &e $[number] &7 in bank account." 117 | # Replaces text with [economy] 118 | economy: "&7 Requires &e $[number] &7 in player account." 119 | # Replaces text with [level] 120 | level: "&7 Requires &e [number] &7 island level." 121 | # Replaces text with [permission] 122 | permission: "&7 Requires `&e[permission]&7` permission." 123 | # Replaces text with [blocks] 124 | blocks-prefix: '&7 Blocks in phase - ' 125 | blocks: '&e [name], ' 126 | wrap-at: '50' 127 | tips: 128 | click-to-previous: "&e Click &7 to view previous page." 129 | click-to-next: "&e Click &7 to view next page." 130 | click-to-change: "&e Click &7 to change." 131 | island: 132 | starting-hologram: "&aWelcome to AOneBlock\n&eBreak This Block to Begin" 133 | -------------------------------------------------------------------------------- /src/main/resources/locales/es.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Seguridad inicial 5 | description: | 6 | &b Previene nuevos jugadores 7 | &b de moverse por 1 minuto 8 | &b Entonces no se caen. 9 | hint: '&c ¡Movimiento bloqueado por seguridad por [number] más segundos!' 10 | free-to-move: '&c Eres libre de moverte. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Bar del jefe 13 | description: | 14 | &b Muestra una barra de estado 15 | &b para cada fase. 16 | aoneblock: 17 | bossbar: 18 | title: Bloques restantes 19 | status: '&a Bloques de fase &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss Bar no está activo para esta isla' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: [lifetime] 27 | description: Establece el número de bloques minados al jugador 28 | set: '&aEl número de bloques minados de [name] se ha establecido en [number]' 29 | set-lifetime: '&aEl numero de bloques totales de [name] se ha establecido en [number]' 30 | setchest: 31 | parameters: 32 | description: >- 33 | Coloca el cofre que estas mirando en una fase con la rareza 34 | especificada 35 | chest-is-empty: '&cEse cofre está vacío, así que no se puede agregar' 36 | unknown-phase: '&cFase desconocida. Presione TAB para verlas' 37 | unknown-rarity: '&cRareza desconocida. Use COMMON, UNCOMMON, RARE o EPIC' 38 | look-at-chest: '&cApunta hacia un cofre lleno para configurarlo' 39 | only-single-chest: '&cSolo se pueden configurar cofres individuales' 40 | success: '&aEl cofre ha sido agregado con éxito a la fase' 41 | failure: >- 42 | &c¡No se pudo agregar el cofre a la fase! Revisa la consola para más 43 | detalles 44 | sanity: 45 | parameters: 46 | description: >- 47 | Muestra una comprobación de las probabilidades de la fase en la 48 | consola 49 | see-console: '&aRevisa la consola para ver el informe' 50 | count: 51 | description: Muestra el número de bloques minados y la fase correspondiente 52 | info: '&aTienes &b[number] bloques minados en la fase &a[name]' 53 | info: 54 | count: >- 55 | &a Island está en el bloque &b [number]&a en la fase &b [name] &a. 56 | Recuento de vida &b [lifetime] &a. 57 | phases: 58 | description: Muestra una lista de todas las fases 59 | title: '&2Fases de OneBlock' 60 | name-syntax: '&a[name]' 61 | description-syntax: '&b[number] bloques' 62 | island: 63 | bossbar: 64 | description: Barra de jefe de fase de alojamiento 65 | status_on: '&b Bossbar &a encendió' 66 | status_off: '&b Bossbar &a apagó' 67 | setcount: 68 | parameters: 69 | description: Establece la cantidad de bloques a un valor previamente completado 70 | set: '&aCantidad establecida en [number].' 71 | too-high: '&c¡Lo máximo que puedes establecer es [number]!' 72 | respawn-block: 73 | description: reaparece el bloque mágico en situaciones en las que desaparece 74 | block-exist: '&a Block existe, no requirió reaparición. Te lo marqué.' 75 | block-respawned: '& un bloque reapareció.' 76 | phase: 77 | insufficient-level: >- 78 | &c¡Tu nivel de isla es demasiado bajo para seguir! Este debe ser de 79 | [number]. 80 | insufficient-funds: '&c¡Tus fondos son insuficientes! Debes tener [number].' 81 | insufficient-bank-balance: >- 82 | &c¡El dinero del banco en la isla es demasiado bajo para seguir! Debes 83 | tener [number]. 84 | insufficient-permission: '&c ¡No puede continuar hasta que obtenga el permiso de [name]!' 85 | cooldown: '&c ¡La siguiente etapa estará disponible en [number] segundos!' 86 | placeholders: 87 | infinite: Infinito 88 | gui: 89 | titles: 90 | phases: '&0&l Fases de OneBlock' 91 | buttons: 92 | previous: 93 | name: '&f&l Pagina Anterior' 94 | description: '&7 Ir a la pagina [number]' 95 | next: 96 | name: '&f&l Siguiente pagina' 97 | description: '&7 Ir a la pagina [number]' 98 | phase: 99 | name: '&f&l [phase]' 100 | description: |- 101 | [starting-block] 102 | [biome] 103 | [bank] 104 | [economy] 105 | [level] 106 | [permission] 107 | starting-block: '&7 Comienza tras romper &e [number] bloques.' 108 | biome: '&7 Bioma: &e [biome]' 109 | bank: '&7 Requiere &e $[number] &7 en la cuenta del banco.' 110 | economy: '&7 Requiere &e $[number] &7 en la cuenta del jugador.' 111 | level: '&7 Requiere &e [number] &7 nivel de isla.' 112 | permission: '&7 Requiere permiso `&e[permission]&7`.' 113 | blocks-prefix: '&7 Bloques en fase -' 114 | blocks: '&e [name], ' 115 | wrap-at: '50' 116 | tips: 117 | click-to-previous: '&e Click &7 para ver pagina anterior.' 118 | click-to-next: '&e Click &7 para ver pagina siguiente.' 119 | click-to-change: '&e Click &7 para cambiar.' 120 | island: 121 | starting-hologram: |- 122 | &aBienvenido a AOneBlock 123 | &eRompe este bloque para empezar 124 | -------------------------------------------------------------------------------- /src/main/resources/locales/fr.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Sécurité de démarrage 5 | description: | 6 | &b Empêche les nouveaux joueurs 7 | &b de déménager pendant 1 minute 8 | &b Alors ils ne tombent pas. 9 | hint: '&c Mouvement bloqué pour la sécurité pendant [number] plus de secondes!' 10 | free-to-move: '&a Vous êtes libre de bouger. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Barre de boss 13 | description: | 14 | &b Affiche une barre d'état 15 | pour chaque phase. 16 | aoneblock: 17 | bossbar: 18 | title: Blocs restants 19 | status: '&a Blocs de phase &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss Bar n''est pas actif pour cette île' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: [DuréeDeVie] 27 | description: Définir le nombre de blocks du joueur 28 | set: '&a Le compte de [name] est défini sur [number].' 29 | set-lifetime: '&a La durée de vie de [name] est de [number]' 30 | setchest: 31 | parameters: 32 | description: mettre le coffre regardé dans une phase avec la rareté spécifiée 33 | chest-is-empty: '&c Ce coffre est vide donc il ne peut pas être ajouté' 34 | unknown-phase: '&c Phase inconnue. Utilisez tab-complete pour les voir' 35 | unknown-rarity: '&c Rareté inconnue. Utilisez COMMON, UNCOMMON, RARE ou EPIC' 36 | look-at-chest: '&c Regardez un coffre rempli pour le placer' 37 | only-single-chest: '&c Seuls les coffres simples peuvent être définis' 38 | success: '&a Le coffre a été ajouté avec succès à la phase' 39 | failure: >- 40 | &c Le coffre n'a pas pu être ajouté à la phase! Voir la console pour 41 | les erreurs 42 | sanity: 43 | parameters: 44 | description: >- 45 | afficher un contrôle d'intégrité des probabilités de phase dans la 46 | console 47 | see-console: '&a Voir la console pour le rapport' 48 | count: 49 | description: afficher le nombre de blocs et la phase 50 | info: '&a Vous êtes sur le bloc &b [number] dans la phase &a [name]' 51 | info: 52 | count: >- 53 | &a L'île est sur le bloc &b [number]&a dans la phase &b [name] &a. 54 | Nombre de durée de vie &b [lifetime] &a. 55 | phases: 56 | description: afficher une liste de toutes les phases 57 | title: '&2 Phases OneBlock' 58 | name-syntax: '&a [name]' 59 | description-syntax: '&b [number] blocs' 60 | island: 61 | bossbar: 62 | description: bascule la barre de boss de phase 63 | status_on: '&b Bossbar a &a activé' 64 | status_off: '&b Bossbar &a désactivé' 65 | setcount: 66 | parameters: 67 | description: définir le nombre de blocs à la valeur précédemment terminée 68 | set: '&a Nombre défini sur [number].' 69 | too-high: "&c Le maximum que vous pouvez définir est [number]\_!" 70 | respawn-block: 71 | description: réapparaît le bloc magique dans les situations où il disparaît 72 | block-exist: >- 73 | &un bloc existe, n'a pas nécessité de réapparition. Je l'ai noté pour 74 | toi. 75 | block-respawned: '&un bloc réapparu.' 76 | phase: 77 | insufficient-level: Ton niveau d'île est trop bas ! Il doit être de [number] au minimum. 78 | insufficient-funds: Tu n'as pas les fonds nécessaire ! Tu dois au moins avoir [number]. 79 | insufficient-bank-balance: >- 80 | Ta banque d'île n'a pas les fonds nécessaire ! Vous devez au moins avoir 81 | [number]. 82 | insufficient-permission: "&c Vous ne pouvez pas continuer jusqu'à ce que vous obteniez l'autorisation de [name]\_!" 83 | cooldown: '&c La prochaine étape sera disponible dans [number] secondes!' 84 | placeholders: 85 | infinite: Infini 86 | gui: 87 | titles: 88 | phases: '&0&l Phases OneBlock' 89 | buttons: 90 | previous: 91 | name: '&f&l Page Précédente' 92 | description: '&7 Aller à la page [number]' 93 | next: 94 | name: '&f&l Page Suivante' 95 | description: '&7 Aller à la page [number]' 96 | phase: 97 | name: '& l [phase]' 98 | description: |- 99 | [starting-block] 100 | [biome] 101 | [bank] 102 | [economy] 103 | [level] 104 | [permission] 105 | starting-block: '&7 Commence après avoir détruit &e [number] blocs.' 106 | biome: "&7 Biome\_: &e [biome]" 107 | bank: '&7 Requiert &e $[number] &7 dans ta banque.' 108 | economy: '&7 Requiert &e $[number] &7 dans ton solde.' 109 | level: '&7 Requiert &e [number] &7 niveaux d''île.' 110 | permission: '&7 Requiert la permission : `&e[permission]&7` .' 111 | blocks-prefix: '&7 Blocs en phase -' 112 | blocks: '&e [name],' 113 | wrap-at: '50' 114 | tips: 115 | click-to-previous: '&e Click &7 pour voir la page précédente.' 116 | click-to-next: '&e Click &7 pour voir la page suivante.' 117 | click-to-change: '&e Click &7 pour changer.' 118 | island: 119 | starting-hologram: |- 120 | &aBienvenue sur AOneBlock 121 | &eMine ce bloc pour commencer 122 | -------------------------------------------------------------------------------- /src/main/resources/locales/hr.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Pokretanje sigurnosti 5 | description: | 6 | &b Sprječava nove igrače 7 | &b od kretanja u 1 minutu 8 | &b Tako da ne padaju. 9 | hint: '&c Kretanje je blokirano zbog sigurnosti za [number] više sekundi!' 10 | free-to-move: '&a Slobodno se krećete. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Boss bar 13 | description: | 14 | &b Prikazuje traku statusa 15 | &b za svaku fazu. 16 | aoneblock: 17 | bossbar: 18 | title: Preostali blokovi 19 | status: '&a Fazni blokovi &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss bar nije aktivan za ovaj otok' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: 27 | description: postavljanje broja blokova igrača 28 | set: '&a broj [name] postavljen je na [number]' 29 | set-lifetime: '&broj životnog vijeka [name] postavljen na [number]' 30 | setchest: 31 | parameters: 32 | description: stavite pregledani sanduk u fazu s specificiranom rijetkošću 33 | chest-is-empty: '&c Taj je škrinja prazna pa se ne može dodati' 34 | unknown-phase: '&c Nepoznata faza. Da biste ih vidjeli, upotrijebite karticu' 35 | unknown-rarity: '&c Nepoznata rijetkost. Koristite COMMON, UNCOMMON, RARE ili EPIC' 36 | look-at-chest: '&c Pogledajte napunjen škrinju da ga postavite' 37 | only-single-chest: '&c Mogu se postaviti samo pojedinačne škrinje' 38 | success: '&a Komoda uspješno dodana u fazu' 39 | failure: >- 40 | &c Grudište se nije moglo dodati u fazu! Pogledajte konzolu za 41 | pogreške 42 | sanity: 43 | parameters: 44 | description: prikazati provjeru ispravnosti faznih vjerojatnosti u konzoli 45 | see-console: '&a Pogledajte konzolu za izvješće' 46 | count: 47 | description: prikazuju broj i fazu bloka 48 | info: '&a Nalazite se na bloku &b [number] u fazi &a [name]' 49 | info: 50 | count: >- 51 | &a Otok je u bloku &b [number]&a u &b [name] &a fazi. Životni vijek &b 52 | [lifetime] &a. 53 | phases: 54 | description: prikažite popis svih faza 55 | title: '&2 OneBlock Faze' 56 | name-syntax: '&a [name]' 57 | description-syntax: '&b [number] blokova' 58 | island: 59 | bossbar: 60 | description: prebacuje fazni boss bar 61 | status_on: '&b Bossbar se &a uključio' 62 | status_off: '&b Bossbar se &a isključio' 63 | setcount: 64 | parameters: 65 | description: postaviti broj blokova na prethodno dovršenu vrijednost 66 | set: '&a Brojanje postavljeno na [number].' 67 | too-high: '&c Maksimalno što možete postaviti je [number]!' 68 | respawn-block: 69 | description: ponovno rađa magični blok u situacijama kada nestane 70 | block-exist: >- 71 | &a blok postoji, nije zahtijevao ponovno stvaranje. Označila sam za 72 | tebe. 73 | block-respawned: '&a blok se ponovno pojavio.' 74 | phase: 75 | insufficient-level: '&c Vaša razina otoka je preniska za nastavak! Mora biti [number].' 76 | insufficient-funds: '&c Vaša su sredstva premala za nastavak! Moraju biti [number].' 77 | insufficient-bank-balance: '&c Stanje otočne banke je premalo za nastavak! Mora biti [number].' 78 | insufficient-permission: '&c Ne možete nastaviti dok ne dobijete dopuštenje [name]!' 79 | cooldown: '&c Sljedeća faza bit će dostupna za [number] sekundi!' 80 | placeholders: 81 | infinite: Beskonačno 82 | gui: 83 | titles: 84 | phases: '&0&l OneBlock faze' 85 | buttons: 86 | previous: 87 | name: '&f&l Prethodna stranica' 88 | description: '&7 Prijeđi na stranicu [number].' 89 | next: 90 | name: '&f&l Sljedeća stranica' 91 | description: '&7 Prijeđi na stranicu [number].' 92 | phase: 93 | name: '&f&l [phase]' 94 | description: |- 95 | [starting-block] 96 | [biome] 97 | [bank] 98 | [economy] 99 | [level] 100 | [permission] 101 | starting-block: '&7 Počinje nakon razbijanja &e [number] blokova.' 102 | biome: '&7 Biome: &e [biome]' 103 | bank: '&7 Zahtijeva &e $[number] &7 na bankovnom računu.' 104 | economy: '&7 Zahtijeva &e $[number] &7 na računu igrača.' 105 | level: '&7 Zahtijeva &e [number] &7 razinu otoka.' 106 | permission: '&7 Zahtijeva dozvolu `&e[permission]&7`.' 107 | blocks-prefix: '&7 Blokovi u fazi -' 108 | blocks: '&e [name], ' 109 | wrap-at: '50' 110 | tips: 111 | click-to-previous: '&e Kliknite &7 za pregled prethodne stranice.' 112 | click-to-next: '&e Kliknite &7 za pregled sljedeće stranice.' 113 | click-to-change: '&e Kliknite &7 za promjenu.' 114 | island: 115 | starting-hologram: |- 116 | &aDobro došli u AOneBlock 117 | &eRazbijte ovaj blok za početak 118 | -------------------------------------------------------------------------------- /src/main/resources/locales/hu.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Induló biztonság 5 | description: | 6 | &b Megakadályozza az új játékosokat 7 | &b 1 percig mozogva 8 | &b Tehát nem esnek le. 9 | hint: >- 10 | &c A mozgás blokkolva a biztonság érdekében, a [number] több 11 | másodpercre! 12 | free-to-move: '&a Szabadon mozoghatsz. ' 13 | ONEBLOCK_BOSSBAR: 14 | name: Főnök 15 | description: | 16 | &b Mutat egy állapotsorot 17 | &b minden fázisra. 18 | aoneblock: 19 | bossbar: 20 | title: Blokkok maradtak 21 | status: '&a Fázisblokkok &b [done] &d / &b [total]' 22 | color: RED 23 | style: SEGMENTED_20 24 | not-active: '&c A Boss Bar nem aktív ezen a szigeten' 25 | commands: 26 | admin: 27 | setcount: 28 | parameters: 29 | description: állítsa be a játékos blokkszámát 30 | set: '&a [name] számának beállítása erre: [number]' 31 | set-lifetime: '&a [name] élettartama a következőre van állítva: [number]' 32 | setchest: 33 | parameters: 34 | description: helyezze a nézett mellkasát egy szakaszba a megadott ritkasággal 35 | chest-is-empty: '&c A mellkas üres, ezért nem adható hozzá' 36 | unknown-phase: '&c Ismeretlen fázis. A Tab-Complete használatával megtekintheti őket' 37 | unknown-rarity: '&c Ismeretlen ritkaság. Használjon COMMON, UNCOMMON, RARE vagy EPIC' 38 | look-at-chest: '&c Nézzen meg egy töltött mellkasat, hogy beállítsa' 39 | only-single-chest: '&c Csak egyetlen ládát lehet beállítani' 40 | success: és egy mellkas sikeresen hozzáadva a fázishoz 41 | failure: '&c A mellkas nem adható hozzá a fázishoz! A hibákat lásd a konzolon' 42 | sanity: 43 | parameters: 44 | description: >- 45 | jelenítse meg a fázis valószínűségeinek józanság-ellenőrzését a 46 | konzolban 47 | see-console: '&a Lásd a jelentés konzolt' 48 | count: 49 | description: mutassa meg a blokkok számát és a fázist 50 | info: '&a Ön a &b [number] blokkban van a &a [name] fázisban' 51 | info: 52 | count: >- 53 | Az &a sziget a &b [number]&a blokkon található, a &b [name] &a fázisban. 54 | Élettartam száma &b [lifetime] &a. 55 | phases: 56 | description: az összes fázis felsorolása 57 | title: '&2 OneBlock Fázis' 58 | name-syntax: '&a [name]' 59 | description-syntax: '&b [number] blokkolja' 60 | island: 61 | bossbar: 62 | description: váltók fázisú főnök sáv 63 | status_on: '&b Bossbar &a bekapcsolt' 64 | status_off: '&b Bossbar &c kikapcsolt' 65 | setcount: 66 | parameters: 67 | description: állítsa be a blokkszámot a korábban kitöltött értékre 68 | set: '&a A számláló értéke [szám].' 69 | too-high: '&c A beállítható maximum [number]!' 70 | respawn-block: 71 | description: varázsblokkot hoz újra olyan helyzetekben, amikor eltűnik 72 | block-exist: '&a Blokk létezik, nem igényelt újbóli megjelenést. megjelöltem neked.' 73 | block-respawned: '&a blokk újjáéledt.' 74 | phase: 75 | insufficient-level: >- 76 | &c A sziget szintje túl alacsony a folytatáshoz! Ennek a következőnek kell 77 | lennie: [number]. 78 | insufficient-funds: '&c A kerete túl kevés a folytatáshoz! Ezeknek [number]-nak kell lenniük.' 79 | insufficient-bank-balance: >- 80 | &c A sziget banki egyenlege túl alacsony a folytatáshoz! Ennek a 81 | következőnek kell lennie: [number]. 82 | insufficient-permission: '&c Nem folytathatja tovább, amíg meg nem szerzi a [name] engedélyt!' 83 | cooldown: '&c A következő szakasz [number] másodpercen belül elérhető lesz!' 84 | placeholders: 85 | infinite: Végtelen 86 | gui: 87 | titles: 88 | phases: '&0&l OneBlock fázisok' 89 | buttons: 90 | previous: 91 | name: '&f&l Előző oldal' 92 | description: '&7 Váltás a [number] oldalra' 93 | next: 94 | name: '&f&l Következő oldal' 95 | description: '&7 Váltás a [number] oldalra' 96 | phase: 97 | name: '&f&l [phase]' 98 | description: |- 99 | [starting-block] 100 | [biome] 101 | [bank] 102 | [economy] 103 | [level] 104 | [permission] 105 | starting-block: '&7 Az &e [number] blokk feltörése után indul.' 106 | biome: '&7 életrajz: &e [biome]' 107 | bank: '&7 Szükséges &e $[number] &7 bankszámlára.' 108 | economy: '&7 &e $[number] &7 játékos fiókot igényel.' 109 | level: '&7 &e [number] &7 szigetszint szükséges.' 110 | permission: '&7 `&e[permission]&7` engedély szükséges.' 111 | blocks-prefix: '&7 Blokkok fázisban -' 112 | blocks: '&e [name], ' 113 | wrap-at: '50' 114 | tips: 115 | click-to-previous: '&e Kattintson a &7 gombra az előző oldal megtekintéséhez.' 116 | click-to-next: '&e Kattintson a &7 gombra a következő oldal megtekintéséhez.' 117 | click-to-change: '&e Kattintson a &7 gombra a módosításhoz.' 118 | island: 119 | starting-hologram: |- 120 | &aÜdvözlünk az AOneBlockban 121 | &eSzüntesse meg ezt a blokkot a kezdéshez 122 | -------------------------------------------------------------------------------- /src/main/resources/locales/id.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Mulai keamanan 5 | description: | 6 | &b Mencegah pemain baru 7 | &b dari bergerak selama 1 menit 8 | &b Jadi mereka tidak jatuh. 9 | hint: '&c Gerakan diblokir untuk keamanan selama [number] lebih banyak detik!' 10 | free-to-move: '&a Anda bebas untuk pindah. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Bos Bar 13 | description: | 14 | &b Menunjukkan bilah status 15 | &b untuk setiap fase. 16 | aoneblock: 17 | bossbar: 18 | title: Blok tersisa 19 | status: Blok fase &b [done] &d / &b [total] 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Bos Bar tidak aktif untuk pulau ini' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: 27 | description: atur jumlah blok pemain 28 | set: '&a hitungan [name] diatur ke [number]' 29 | set-lifetime: '&a Hitungan seumur hidup [name] diatur ke [number]' 30 | setchest: 31 | parameters: 32 | description: letakkan dada yang tampak dalam fase dengan kelangkaan yang ditentukan 33 | chest-is-empty: '&c Peti itu kosong sehingga tidak bisa ditambahkan' 34 | unknown-phase: '&c Fase tidak dikenal. Gunakan tab-complete untuk melihatnya' 35 | unknown-rarity: >- 36 | &c Kelangkaan tidak diketahui. Gunakan COMMON, UNCOMMON, RARE atau 37 | EPIC 38 | look-at-chest: '&c Lihat peti berisi untuk mengaturnya' 39 | only-single-chest: '&c Hanya peti tunggal yang dapat ditetapkan' 40 | success: '&a Dada berhasil ditambahkan ke fase' 41 | failure: '&c Dada tidak dapat ditambahkan ke fase! Lihat konsol untuk kesalahan' 42 | sanity: 43 | parameters: 44 | description: menampilkan pemeriksaan kewarasan dari probabilitas fase di konsol 45 | see-console: '&a Lihat konsol untuk laporannya' 46 | count: 47 | description: perlihatkan jumlah blok dan fase 48 | info: '&a Anda berada di blok &b [number] dalam fase &a [name]' 49 | info: 50 | count: '&a Pulau ada di blok &b [number] &a dalam fase &b [name]. ' 51 | phases: 52 | description: perlihatkan daftar semua fase 53 | title: '&2 Fase OneBlock' 54 | name-syntax: '&a [name]' 55 | description-syntax: '&b [number] blok' 56 | island: 57 | bossbar: 58 | description: Mengalogkan Bar Bos Fase 59 | status_on: '&b Bos bar &a dihidupkan' 60 | status_off: '&b Bos bar &c dimatikan' 61 | setcount: 62 | parameters: 63 | description: Setel jumlah blok ke nilai yang sebelumnya selesai 64 | set: '&a Hitung diatur ke [number].' 65 | too-high: '&c Maksimum yang dapat Anda atur adalah [number]!' 66 | respawn-block: 67 | description: respawns blok ajaib dalam situasi saat menghilang 68 | block-exist: '&a Blok ada, tidak memerlukan respawning. ' 69 | block-respawned: '&a Blokir dihidupkan kembali.' 70 | phase: 71 | insufficient-level: '&c Tingkat pulau Anda terlalu rendah untuk [number]! ' 72 | insufficient-funds: '&c Dana Anda terlalu rendah untuk [number]! ' 73 | insufficient-bank-balance: '&c Saldo bank pulau terlalu rendah untuk [number]! ' 74 | insufficient-permission: >- 75 | &c Anda tidak dapat melanjutkan lebih jauh sampai Anda mendapatkan izin 76 | [name]! 77 | cooldown: Fase berikutnya akan tersedia dalam detik [number]! 78 | placeholders: 79 | infinite: Tak terbatas 80 | gui: 81 | titles: 82 | phases: OneBlock Phases 83 | buttons: 84 | previous: 85 | name: '&f&l halaman sebelumnya' 86 | description: '&7 Beralih ke halaman [number]' 87 | next: 88 | name: '&f&l halaman berikutnya' 89 | description: '&7 Beralih ke halaman [number]' 90 | phase: 91 | name: '&f&l [phase]' 92 | description: |- 93 | [starting-block] 94 | [biome] 95 | [bank] 96 | [economy] 97 | [level] 98 | [permission] 99 | [blocks] 100 | starting-block: '&7 Dimulai setelah melanggar &e blok [number].' 101 | biome: '&7 Biome: &e [biome]' 102 | bank: '&7 Membutuhkan &e $[number] &7 di rekening bank.' 103 | economy: '&7 Membutuhkan &e $[number] &7 di akun pemain.' 104 | level: '&7 Membutuhkan tingkat pulau &e [number].' 105 | permission: '&7 Membutuhkan izin &e `[permission]`.' 106 | blocks-prefix: '&7 Blok dalam fase -' 107 | blocks: '&e [name], ' 108 | wrap-at: '50' 109 | tips: 110 | click-to-previous: '&e Klik &7 untuk melihat halaman sebelumnya.' 111 | click-to-next: '&e Klik &7 untuk melihat halaman berikutnya.' 112 | click-to-change: '&e Klik &7 untuk berubah.' 113 | island: 114 | starting-hologram: |- 115 | &a Selamat datang di AONEBLOCK 116 | &e Hancurkan blok ini untuk memulai 117 | -------------------------------------------------------------------------------- /src/main/resources/locales/it.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Avvio della sicurezza 5 | description: | 6 | &b Impedisce nuovi giocatori 7 | &b dal muoversi per 1 minuto 8 | &b Quindi non cadono. 9 | hint: '&c Movimento bloccato per sicurezza per [number] più secondi!' 10 | free-to-move: '&a Sei libero di muoverti. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Boss Bar 13 | description: | 14 | &b Mostra una barra di stato 15 | &b per ogni fase. 16 | aoneblock: 17 | bossbar: 18 | title: Blocca i restanti 19 | status: '&a Blocchi di fase &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss Bar non è attivo per quest''isola' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: 27 | description: imposta il conteggio dei blocchi del giocatore 28 | set: '&a il conteggio di [name] impostato su [number]' 29 | set-lifetime: '&a Il conteggio della vita di [name] è impostato su [number]' 30 | setchest: 31 | parameters: 32 | description: mettere il torace osservato in una fase con la rarità specificata 33 | chest-is-empty: '&c Quella cassa è vuota quindi non può essere aggiunta' 34 | unknown-phase: '&c Fase sconosciuta. Usa tab-complete per vederli' 35 | unknown-rarity: '&c Rarità sconosciuta. Utilizzare COMMON, UNCOMMON, RARE o EPIC' 36 | look-at-chest: '&c Guarda una cassa piena per impostarla' 37 | only-single-chest: '&c Possono essere impostati solo singoli forzieri' 38 | success: '&a Una cassa aggiunta correttamente alla fase' 39 | failure: '&c Chest non può essere aggiunto alla fase! Vedi console per errori' 40 | sanity: 41 | parameters: 42 | description: >- 43 | visualizzare un controllo di integrità delle probabilità di fase nella 44 | console 45 | see-console: '&a Vedi la console per il rapporto' 46 | count: 47 | description: mostra il conteggio dei blocchi e la fase 48 | info: '&a Sei sul blocco &b [number] nella fase &a [name]' 49 | info: 50 | count: >- 51 | &a L'isola è in blocco &b [number] &a nella fase &b [name] &a. Lifetime 52 | count &b [lifetime] &a. 53 | phases: 54 | description: mostra un elenco di tutte le fasi 55 | title: '&2 Fasi OneBlock' 56 | name-syntax: '&a [name]' 57 | description-syntax: '&b [number] blocchi' 58 | island: 59 | bossbar: 60 | description: barra boss di fase di levetta 61 | status_on: '&b Bossbar si è &a acceso' 62 | status_off: '&b Bossbar si è &c spento' 63 | setcount: 64 | parameters: 65 | description: Imposta il conteggio dei blocchi sul valore precedentemente completato 66 | set: '&a Contare impostato su [number].' 67 | too-high: '&c Il massimo che puoi impostare è [number]!' 68 | respawn-block: 69 | description: Respira il blocco magico in situazioni quando scompare 70 | block-exist: '&a Il blocco esiste, non ha richiesto il rigenerazione. ' 71 | block-respawned: '&a Blocco rigenerato.' 72 | phase: 73 | insufficient-level: 'Il tuo livello dell''isola è troppo basso per procedere! ' 74 | insufficient-funds: '& c i tuoi fondi sono troppo bassi per procedere! Devono essere [number].' 75 | insufficient-bank-balance: '&c The island bank balance is too low to proceed! It must be [number].' 76 | insufficient-permission: '&c You can proceed no further until you obtain the [name] permission!' 77 | cooldown: '&c Next phase will be available in [number] seconds!' 78 | placeholders: 79 | infinite: Infinito 80 | gui: 81 | titles: 82 | phases: '&0&l fasi di un blocco' 83 | buttons: 84 | previous: 85 | name: '& l pagina precedente' 86 | description: '&7 Passa alla pagina [number]' 87 | next: 88 | name: '&f&l Pagina successiva' 89 | description: '&7 Passa alla pagina [number]' 90 | phase: 91 | name: '&f&l [phase]' 92 | description: |- 93 | [starting-block] 94 | [biome] 95 | [bank] 96 | [economy] 97 | [level] 98 | [permission] 99 | [blocks] 100 | starting-block: '&7 Inizia dopo aver rotto i blocchi &e [number].' 101 | biome: '&7 Biome: &e [biome]' 102 | bank: '&7 Richiede &e $ [number] &7 nel conto bancario.' 103 | economy: '&7 Richiede &e $ [number] &7 nell''account giocatore.' 104 | level: '&7 Richiede il livello &e [number] &7 dell''isola.' 105 | permission: '&7 Richiede il permesso &e`[permission]`.' 106 | blocks-prefix: '&7 Blocchi in fase -' 107 | blocks: '&e [name], ' 108 | wrap-at: '50' 109 | tips: 110 | click-to-previous: '&e Fare clic &7 per visualizzare la pagina precedente.' 111 | click-to-next: '&e Fare clic &7 per visualizzare la pagina successiva.' 112 | click-to-change: '&e Fai clic &7 per cambiare.' 113 | island: 114 | starting-hologram: |- 115 | &a Benvenuti in Aoneblock 116 | &e Rompere questo blocco per iniziare 117 | -------------------------------------------------------------------------------- /src/main/resources/locales/ja.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: 安全性の開始 5 | description: | 6 | &b 新しいプレイヤーを防ぎます 7 | &b 1分間移動することから 8 | &b だから彼らは落ちません。 9 | hint: '&c [number]のために安全のために動きがブロックされました。' 10 | free-to-move: '&a あなたは自由に動くことができます。' 11 | ONEBLOCK_BOSSBAR: 12 | name: ボスバー 13 | description: | 14 | &b ステータスバーを表示します 15 | &b 各フェーズについて。 16 | aoneblock: 17 | bossbar: 18 | title: 残りのブロック 19 | status: 位相ブロック &b [done] &d / &b [total] 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c この島ではボスバーがアクティブではありません' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: <名前> <数> 27 | description: プレイヤーのブロック数を設定する 28 | set: '[name]の数が[number]に設定されました' 29 | set-lifetime: '&a [name] の有効期間カウントが [number] に設定されました' 30 | setchest: 31 | parameters: <フェーズ> <レア度> 32 | description: 見つめられた胸部を、指定された希少性を持つフェーズに置く 33 | chest-is-empty: &cそのチェストは空なので追加できません 34 | unknown-phase: &c不明なフェーズ。タブコンプリートを使用して表示します 35 | unknown-rarity: &c希少性は不明です。 COMMON、UNCOMMON、RARE、またはEPICを使用します 36 | look-at-chest: &c満たされた箱を見てそれを設定します 37 | only-single-chest: &c単一のチェストのみを設定できます 38 | success: &a胸部がフェーズに追加されました 39 | failure: &cチェストをフェーズに追加できませんでした!エラーについてはコンソールを参照してください 40 | sanity: 41 | parameters: <フェーズ> 42 | description: コンソールに位相確率の健全性チェックを表示する 43 | see-console: &aコンソールでレポートを表示 44 | count: 45 | description: ブロック数とフェーズを表示する 46 | info: '[name]フェーズのブロック[number]にいます' 47 | info: 48 | count: >- 49 | &a 島は &b [name] &a フェーズのブロック &b [number]&a 上にあります。生涯カウント &b [lifetime] 50 | &a。 51 | phases: 52 | description: すべてのフェーズのリストを表示する 53 | title: &2 OneBlockフェーズ 54 | name-syntax: '&a[name]' 55 | description-syntax: '&b [number]ブロック' 56 | island: 57 | bossbar: 58 | description: トグルフェーズボスバー 59 | status_on: '&b ボスバーが&a オン' 60 | status_off: '&b ボスバーが&aオフ' 61 | setcount: 62 | parameters: <カウント> 63 | description: ブロック数を以前に完了した値に設定する 64 | set: '&a カウントを [数値] に設定します。' 65 | too-high: '&c 設定できる最大値は [number] です!' 66 | respawn-block: 67 | description: マジックブロックが消えた場合に再出現します 68 | block-exist: '&a ブロックが存在します。再生成は必要ありませんでした。私はあなたのためにそれをマークしました。' 69 | block-respawned: '&a ブロックが復活しました。' 70 | phase: 71 | insufficient-level: '&c 島のレベルが低すぎるので先に進めません! [number] である必要があります。' 72 | insufficient-funds: '&c 資金が少なすぎるため続行できません。 [number] である必要があります。' 73 | insufficient-bank-balance: '&c 島の銀行残高が少なすぎるため続行できません。 [number] である必要があります。' 74 | insufficient-permission: '&c [name] の許可を取得するまで、これ以上先に進むことはできません。' 75 | cooldown: '&c [number] 秒で次のステージへ!' 76 | placeholders: 77 | infinite: 無限 78 | gui: 79 | titles: 80 | phases: '&0&l ワンブロックフェーズ' 81 | buttons: 82 | previous: 83 | name: '&f&l 前のページ' 84 | description: '&7 [number]ページに切り替えます' 85 | next: 86 | name: '&f&l 次のページ' 87 | description: '&7 [番号]ページに切り替えます' 88 | phase: 89 | name: '&f&l [phase]' 90 | description: |- 91 | [starting-block] 92 | [biome] 93 | [bank] 94 | [economy] 95 | [level] 96 | [permission] 97 | starting-block: '&7 &e [number] ブロックを分割した後に開始します。' 98 | biome: '&7 バイオーム: &e [biome]' 99 | bank: '&7 銀行口座に &e $[number] &7 が必要です。' 100 | economy: '&7 プレイヤーアカウントに &e $[number] &7 が必要です。' 101 | level: '&7 &e [number] &7 の島レベルが必要です。' 102 | permission: '&7 `&e[permission]&7` 権限が必要です。' 103 | blocks-prefix: '&7 フェーズのブロック - ' 104 | blocks: '&e [name], ' 105 | wrap-at: '50' 106 | tips: 107 | click-to-previous: '&e &7 をクリックして前のページを表示します。' 108 | click-to-next: '&e &7 をクリックして次のページを表示します。' 109 | click-to-change: '&e &7 をクリックして変更します。' 110 | island: 111 | starting-hologram: |- 112 | &aAOneBlock へようこそ 113 | &eこのブロックを壊して開始してください 114 | -------------------------------------------------------------------------------- /src/main/resources/locales/pl.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Początkowe bezpieczeństwo 5 | description: | 6 | &b Zapobiega nowych graczy 7 | &b Od przeprowadzki na 1 minutę 8 | &b Więc nie spadają. 9 | hint: '&c Ruch zablokowany dla bezpieczeństwa przez [number] więcej sekund!' 10 | free-to-move: '&a Możesz się poruszać. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Bar Boss 13 | description: | 14 | &b Pokazuje pasek stanu 15 | &b dla każdej fazy. 16 | aoneblock: 17 | bossbar: 18 | title: Pozostałe bloki 19 | status: '&a Bloki fazowe &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss Bar nie jest aktywny dla tej wyspy' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: 27 | description: ustaw liczbę bloków gracza 28 | set: '&a Liczba [name] została ustawiona na [number]' 29 | set-lifetime: '&a [name] licznik życia ustawiony na [number]' 30 | setchest: 31 | parameters: 32 | description: umieść oglądaną skrzynię w fazie o określonej rzadkości 33 | chest-is-empty: '&cTa skrzynia jest pusta, więc nie można jej dodać' 34 | unknown-phase: '&cNieznana faza. Aby uzupełnić, użyj tabulacji' 35 | unknown-rarity: '&cNieznana rzadkość. Użyj COMMON, UNCOMMON, RARE lub EPIC' 36 | look-at-chest: '&cSpójrz na wypełnioną skrzynię, aby ją ustawić' 37 | only-single-chest: '&cMożna ustawić tylko pojedyncze skrzynie' 38 | success: '&aSkrzynia pomyślnie dodana do fazy' 39 | failure: '&cSkrzynia nie mogła zostać dodana do fazy! Zobacz błąd w konsoli' 40 | sanity: 41 | parameters: 42 | description: wyświetlać kontrolę poprawności prawdopodobieństwa fazy w konsoli 43 | see-console: '&a Zobacz raport w konsoli' 44 | count: 45 | description: pokaż liczbę bloków i fazę 46 | info: '&a Jesteś na bloku &b [number] w fazie &a [name]' 47 | info: 48 | count: >- 49 | &a Wyspa jest na bloku &b [number] w fazie [name]. Lifetime count &b 50 | [lifetime] &a. 51 | phases: 52 | description: pokaż listę wszystkich faz 53 | title: '&2 Fazy OneBlock' 54 | name-syntax: '&a [name]' 55 | description-syntax: '&b [number] bloków' 56 | island: 57 | bossbar: 58 | description: Przełącza fazę boss 59 | status_on: '&b Bossbar &a włączył' 60 | status_off: '&b Bossbar &a wyłączył' 61 | setcount: 62 | parameters: 63 | description: ustaw liczbę bloków na poprzednio uzupełnioną wartość 64 | set: '&a Liczba ustawiona na [number].' 65 | too-high: '&c Maksymalna wartość, jaką możesz ustawić, to [number]!' 66 | respawn-block: 67 | description: odnawia magiczny blok, w przypadku zniknięcia 68 | block-exist: '&a Blok nie potrzebował odnowienia. Został chwilowo zaznaczony' 69 | block-respawned: '&a Odnowiono blok, proszę nie usuwaj go ponownie' 70 | phase: 71 | insufficient-level: Poziom Twojej wyspy jest za niski, aby kontynuować! Musi to być [number]. 72 | insufficient-funds: Twoje fundusze są zbyt niskie, aby kontynuować! Musisz posiadać [number]. 73 | insufficient-bank-balance: >- 74 | Saldo na rachunku bankowym wyspy jest zbyt niskie, aby kontynuować! Musi 75 | to być [number]. 76 | insufficient-permission: Nie możesz kontynuować, dopóki nie uzyskasz pozwolenia [name]! 77 | cooldown: '&c Następny etap będzie dostępny za [number] sekund!' 78 | placeholders: 79 | infinite: Nieskończony 80 | gui: 81 | titles: 82 | phases: '&0&l Fazy OneBlock' 83 | buttons: 84 | previous: 85 | name: '&f&lNastępna strona' 86 | description: '&7 Przeskocz do [number] strony' 87 | next: 88 | name: '&f&l Następna strona' 89 | description: '&7 Przeskocz do [number] strony' 90 | phase: 91 | name: '&f&l [phase]' 92 | description: |- 93 | [starting-block] 94 | [biome] 95 | [bank] 96 | [economy] 97 | [level] 98 | [permission] 99 | starting-block: '&7 Rozpoczyna sie po&e [number] &7zniszczonych blokach.' 100 | biome: '&7 Biom: &e [biome]' 101 | bank: '&7 Potrzebujesz&e $[number] &7 na twoim koncie.' 102 | economy: '&7 Potrzebujesz&e $[number] &7 na twoim koncie.' 103 | level: '&7 Potrzebujesz &e [number] &7 poziom wyspy.' 104 | permission: '&7 Wymaga uprawnienia `&e[permission]&7`.' 105 | blocks-prefix: '&7 Bloki w fazie -' 106 | blocks: '&e [name], ' 107 | wrap-at: '50' 108 | tips: 109 | click-to-previous: '&e Kliknij &7, aby wyświetlić poprzednią stronę.' 110 | click-to-next: '&e Kliknij &7, aby wyświetlić następną stronę.' 111 | click-to-change: '&e Kliknij &7, aby zmienić.' 112 | island: 113 | starting-hologram: |- 114 | &aWitamy w OneBlock 115 | &eZniszcz ten blok, aby rozpocząć 116 | -------------------------------------------------------------------------------- /src/main/resources/locales/pt.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Segurança inicial 5 | description: | 6 | &b Impede novos jogadores 7 | &b de se mudar por 1 minuto 8 | &b Então eles não caem. 9 | hint: '&c Movimento bloqueado por segurança por [número] mais segundos!' 10 | free-to-move: '&a Você está livre para se mover. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Boss Bar 13 | description: | 14 | &b Mostra uma barra de status 15 | &b para cada fase. 16 | aoneblock: 17 | bossbar: 18 | title: Bloqueia o restante 19 | status: '&a Blocos de fase &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c O Boss Bar não está ativo para esta ilha' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: 27 | description: definir contagem de blocos do jogador 28 | set: '&a [name] contagem definida para [number]' 29 | set-lifetime: '&a A contagem de vida útil [name] definida como [number]' 30 | setchest: 31 | parameters: 32 | description: colocar o baú olhado em uma fase com a raridade especificada 33 | chest-is-empty: '&c Esse baú está vazio, então não pode ser adicionado' 34 | unknown-phase: '&c Fase desconhecida. Use tab-complete para vê-los' 35 | unknown-rarity: '&c Raridade desconhecida. Use COMMON, UNCOMMON, RARE ou EPIC' 36 | look-at-chest: '&c Olhe para um baú cheio para configurá-lo' 37 | only-single-chest: '&c Apenas baús individuais podem ser ajustados' 38 | success: '&a Baú adicionado com sucesso à fase' 39 | failure: '&c O Bau não pôde ser adicionado à fase! Veja o console para erros' 40 | sanity: 41 | parameters: 42 | description: >- 43 | exibir uma verificação de sanidade das probabilidades de fase no 44 | console 45 | see-console: '&a Veja o console para o relatório' 46 | count: 47 | description: mostra a contagem de blocos e a fase 48 | info: '&a Você está no bloco &b [number] no &a [name] fase' 49 | info: 50 | count: >- 51 | &a A ilha está em bloco &b [number] &a na fase &b [name]. Lifetime count 52 | &b [lifetime] &a. 53 | phases: 54 | description: mostra uma lista de todas as fases 55 | title: '&2 OneBlock Fases' 56 | name-syntax: '&a [name]' 57 | description-syntax: '&b [number] blocos' 58 | island: 59 | bossbar: 60 | description: Alterna o Boss Boss Bar 61 | status_on: '&b Bossbar &a ligado' 62 | status_off: '&b Bossbar &c desligado' 63 | setcount: 64 | parameters: 65 | description: Defina a contagem de blocos para o valor previamente concluído 66 | set: '&a Contagem definida como [number].' 67 | too-high: '&c O máximo que você pode definir é [number]!' 68 | respawn-block: 69 | description: Responda o bloco mágico em situações quando desaparece 70 | block-exist: '&a O bloco existe, não exigiu reaparecimento. ' 71 | block-respawned: '&a Bloquear o reaparecido.' 72 | phase: 73 | insufficient-level: '&c O nível da sua ilha é muito baixo para prosseguir! ' 74 | insufficient-funds: '&c Seus fundos são muito baixos para prosseguir! ' 75 | insufficient-bank-balance: '&c O saldo do banco da ilha é muito baixo para prosseguir! ' 76 | insufficient-permission: '&c Você não pode proceder mais até obter a permissão [name]!' 77 | cooldown: '&c A próxima fase estará disponível em [number] segundos!' 78 | placeholders: 79 | infinite: Infinito 80 | gui: 81 | titles: 82 | phases: Oneblock Fases 83 | buttons: 84 | previous: 85 | name: '&f&l Página anterior' 86 | description: '&7 Mudar para a página [number]' 87 | next: 88 | name: '&f&l Próxima página' 89 | description: '&7 Mudar para a página [number]' 90 | phase: 91 | name: '&f&l [phase]' 92 | description: |- 93 | [starting-block] 94 | [biome] 95 | [bank] 96 | [economy] 97 | [level] 98 | [permission] 99 | [blocks] 100 | starting-block: '&7 Começa após quebrar &e blocos [number].' 101 | biome: '&7 Bioma: [biome]' 102 | bank: '&7 Requer &e $ [number] &7 na conta bancária.' 103 | economy: '&7 Requer &e $ [number] &7 na conta do jogador.' 104 | level: '&7 Requer &e [number] &7 no nível da ilha.' 105 | permission: '&7 Requer `&e[permission]&7` permissão.' 106 | blocks-prefix: '&7 Blocos em fase -' 107 | blocks: '&e [name], ' 108 | wrap-at: '50' 109 | tips: 110 | click-to-previous: '&e Clique &7 para visualizar a página anterior.' 111 | click-to-next: '&e Clique &7 para visualizar a próxima página.' 112 | click-to-change: '&e Clique &7 para alterar.' 113 | island: 114 | starting-hologram: |- 115 | &a Bem -vindo ao AOneBlock 116 | &e Quebre este bloco para começar 117 | -------------------------------------------------------------------------------- /src/main/resources/locales/ru.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Начальная безопасность 5 | description: | 6 | &b Предотвращает новых игроков 7 | &b от переезда на 1 минуту 8 | &b Так что они не падают. 9 | hint: '&c Движение заблокировано для безопасности для [number] больше секунд!' 10 | free-to-move: '&a Вы можете свободно двигаться. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Boss Bar 13 | description: | 14 | &b Показывает строку статуса 15 | &b Для каждого этапа. 16 | aoneblock: 17 | bossbar: 18 | title: Блоки остались 19 | status: '&a Фазовые блоки &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss Bar не активен для этого острова' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: [lifetime] 27 | description: установить количество блоков игрока 28 | set: '&a [name] кол-во блоков установлено на [number]' 29 | set-lifetime: '&a Счетчик жизни [name] установлен на [number]' 30 | setchest: 31 | parameters: 32 | description: положить проверенный сундук в фазу с указанной редкостью 33 | chest-is-empty: '&c Этот сундук пуст, поэтому не может быть добавлен' 34 | unknown-phase: '&c Неизвестная фаза. Используйте Tab-Complete, чтобы увидеть их' 35 | unknown-rarity: '&c Неизвестная редкость. Используйте COMMON, UNCOMMON, RARE или EPIC' 36 | look-at-chest: '&c Посмотрите на заполненный сундук, чтобы установить его' 37 | only-single-chest: '&c Можно установить только один сундук' 38 | success: '&a Сундук успешно добавлен в фазу' 39 | failure: '&c Сундук не может быть добавлен в фазу! Смотрите консоль для ошибок' 40 | sanity: 41 | parameters: 42 | description: отобразить проверку исправности фазовых вероятностей в консоли 43 | see-console: '&a Смотрите консоль для отчета' 44 | count: 45 | description: показать количество блоков и фаз 46 | info: '&a Вы находитесь в блоке &b [number] в &a [name] фазе' 47 | info: 48 | count: '&a Остров находится на блоке &b [number] &a в фазе &b [number]. ' 49 | phases: 50 | description: показать список всех фаз 51 | title: '&2 Фазы OneBlock' 52 | name-syntax: '&a [name]' 53 | description-syntax: '&b [number] блоков' 54 | island: 55 | bossbar: 56 | description: Переключает фазовую бар босса 57 | status_on: '&b Боссбар &a включился' 58 | status_off: '&b Боссбар &c выключился' 59 | setcount: 60 | parameters: 61 | description: установить счетчик блоков на ранее завершенное значение 62 | set: '&a Счетчик установлен на [number].' 63 | too-high: '&c Максимум, что вы можете установить, это [number]!' 64 | respawn-block: 65 | description: возрождает магический блок в ситуациях, когда они исчезают 66 | block-exist: '&a Блок существует, не требует возрождения. Я отметил это для вас.' 67 | block-respawned: '& Блок возродился, пожалуйста, не аннулируйте его снова.' 68 | phase: 69 | insufficient-level: >- 70 | &c Уровень вашего острова слишком низок для продолжения! Должно быть 71 | [number]. 72 | insufficient-funds: '&c У вас слишком мало средств для продолжения! Они должны быть [number].' 73 | insufficient-bank-balance: >- 74 | &c Баланс банка острова слишком низок для продолжения! Должно быть 75 | [number]. 76 | insufficient-permission: '&c Вы не можете продолжать, пока не получите разрешение [name]!' 77 | cooldown: '&c Следующий этап будет доступен через [number] секунд!' 78 | placeholders: 79 | infinite: Бесконечный 80 | gui: 81 | titles: 82 | phases: '&0&l Фазы OneBlock' 83 | buttons: 84 | previous: 85 | name: '&f&l Предыдущая страница' 86 | description: '&7 Перейти на [number] страницы' 87 | next: 88 | name: '&f&l Следующая страница' 89 | description: '&7 Перейти на [number] страницы' 90 | phase: 91 | name: '&f&l [phase]' 92 | description: |- 93 | [starting-block] 94 | [biome] 95 | [bank] 96 | [economy] 97 | [level] 98 | [permission] 99 | starting-block: '&7 Запускается после разбиения блоков &e [number].' 100 | biome: '&7 Биом: &e [biome]' 101 | bank: '&7 Требуется &e $[number] &7 на банковском счете.' 102 | economy: '&7 Требуется &e $[number] &7 в учетной записи игрока.' 103 | level: '&7 Требуется &e [number] &7 уровня острова.' 104 | permission: '&7 Требуется разрешение `&e[permission]&7`.' 105 | blocks-prefix: '&7 Блоки в фазе -' 106 | blocks: '&e [name], ' 107 | wrap-at: '50' 108 | tips: 109 | click-to-previous: '&e Нажмите &7, чтобы просмотреть предыдущую страницу.' 110 | click-to-next: '&e Нажмите &7 для просмотра следующей страницы.' 111 | click-to-change: '&e Нажмите &7, чтобы изменить.' 112 | island: 113 | starting-hologram: |- 114 | &aДобро пожаловать в AOneBlock 115 | &eРазбейте этот блок, чтобы начать 116 | -------------------------------------------------------------------------------- /src/main/resources/locales/tr.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Güvenli mod başlatılıyor 5 | description: | 6 | &b Yeni oyuncuları 1 dakika boyunca kıpırdamasını engeller 7 | &b böylece aşağı düşmezler. 8 | hint: '&c Haraketler [number] saniye daha güvenlik için engellenmiştir!' 9 | free-to-move: '&a Artık kıpırdayabilirsin dikkatli ol!' 10 | ONEBLOCK_BOSSBAR: 11 | name: Patron bar 12 | description: | 13 | &b Bir durum çubuğu gösterir 14 | &b her aşama için. 15 | aoneblock: 16 | bossbar: 17 | title: Kalan bloklar 18 | status: '&a Faz blokları &b [done] &d / &b [total]' 19 | color: RED 20 | style: SEGMENTED_20 21 | not-active: '&c Patron Bar bu ada için aktif değil' 22 | commands: 23 | admin: 24 | setcount: 25 | parameters: [lifetime] 26 | description: oyuncunun blok sayısını ayarla 27 | set: '&a [name] ''ın sayısı [number] olarak ayarlandı' 28 | set-lifetime: '&a [name]''nin toplam kırılan blok sayısı [number] olarak ayarlandı' 29 | setchest: 30 | parameters: 31 | description: bakılan sandığı nadir görülen bir evreye koyar 32 | chest-is-empty: '&c Bu sandık boş, bu yüzden eklenemez' 33 | unknown-phase: >- 34 | &c Bilinmeyen aşama. Bunları görmek için sekme-tamamlama özelliğini 35 | kullanın 36 | unknown-rarity: '& c Bilinmeyen nadirlik. COMMON, UNCOMMON, RARE veya EPIC kullanın' 37 | look-at-chest: '&c Ayarlamak için dolu bir sandığa bakın' 38 | only-single-chest: '&c Yalnızca tek sandık ayarlanabilir' 39 | success: '&a Sandık aşamaya başarıyla eklendi' 40 | failure: '&c Sandık aşamaya eklenemedi! Hatalar için konsola bakın' 41 | sanity: 42 | parameters: 43 | description: konsoldaki faz olasılıklarının akıl sağlığını kontrol etmek 44 | see-console: '&a Rapor için konsola bakın' 45 | count: 46 | description: blok sayısını ve aşamayı göster 47 | info: '&a [name] aşamasında blok &b [number] üzerindesiniz' 48 | info: 49 | count: >- 50 | &a Ada blok sayısı &b [number] &b [name] &a aşamasında. Toplam kırılan 51 | blok &b [lifetime] &a. 52 | phases: 53 | description: tüm aşamaların bir listesini göster 54 | title: '&2 TekBlok Aşaması' 55 | name-syntax: '&a [name]' 56 | description-syntax: '&b [number] blokları' 57 | island: 58 | bossbar: 59 | description: Faz patron çubuğunu değiştirir 60 | status_on: '&b Bossbar &a açıldı' 61 | status_off: '&b Bossbar &c kapandı' 62 | setcount: 63 | parameters: 64 | description: blok sayısını önceden tamamlanmış değere ayarla 65 | set: '&a Sayım [number] olarak ayarlandı.' 66 | too-high: '&c Ayarlayabileceğiniz maksimum sayı [number]!' 67 | respawn-block: 68 | description: Kaynak bloğunu kaybolma durumlarında yeniden doğurur 69 | block-exist: '&a Kaynak bloğu yerinde senin için işaretledim.' 70 | block-respawned: '&a Kaynak bloğu yeniden doğdu.' 71 | phase: 72 | insufficient-level: '&c Ada seviyeniz devam etmek için çok düşük! [number] olmalıdır.' 73 | insufficient-funds: '&c Paranız devam etmek için çok düşük! [number] olmalıdırlar.' 74 | insufficient-bank-balance: '&c Ada bankası bakiyesi devam etmek için çok düşük! [number] olmalıdır.' 75 | insufficient-permission: '&c [name] iznini alana kadar devam edemezsiniz!' 76 | cooldown: '&c Bir sonraki aşama [number] saniye içinde hazır olacak!' 77 | placeholders: 78 | infinite: Sonsuz 79 | gui: 80 | titles: 81 | phases: '&0&l TekBlok Aşamaları' 82 | buttons: 83 | previous: 84 | name: '&f&l Önceki Sayfa' 85 | description: '&7 [number] Sayılı sayfaya geçer' 86 | next: 87 | name: '&f&l Sıradaki Sayfa ' 88 | description: '&7 [number] Sayılı sayfaya geçer' 89 | phase: 90 | name: '&f&l [phase]' 91 | description: |- 92 | [starting-block] 93 | [biome] 94 | [bank] 95 | [economy] 96 | [level] 97 | [permission] 98 | [blocks] 99 | starting-block: '&7 &e [sayı] kadar blok kırdıktan sonra başlar.' 100 | biome: '&7 Biome: &e [biome]' 101 | bank: '&7 Banka hesabında &e $[number] &7 olması gerekli.' 102 | economy: '&7 Bakiyenizin &e $[number] &7 olması gerekli.' 103 | level: '&7 &e [sayı] &7 kadar ada seviyeniz olmalı.' 104 | permission: '&7 `&e[izin]&7` izni gerektirir.' 105 | blocks-prefix: '&7 Aşamadaki bloklar - ' 106 | blocks: '&e [name], ' 107 | wrap-at: '50' 108 | tips: 109 | click-to-previous: '&e Önceki sayfayı görüntülemek için &7 tıklayın.' 110 | click-to-next: '&e Sonraki sayfayı görüntülemek için &7 tıklayın.' 111 | click-to-change: '&e Değiştirmek için &7 tıklayın.' 112 | island: 113 | starting-hologram: |- 114 | &aTekBlok'a Hoş Geldiniz 115 | &eBaşlamak için Bu Bloğu Kırın 116 | -------------------------------------------------------------------------------- /src/main/resources/locales/uk.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Початкова безпека 5 | description: | 6 | &b Запобігає новим гравцям 7 | &b від переміщення протягом 1 хвилини 8 | &b Тож вони не падають. 9 | hint: '&c Рух заблокований для безпеки для [number] більше секунд!' 10 | free-to-move: '&a Ви вільно рухаєтесь. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Бар для боса 13 | description: | 14 | &b Показує панель стану 15 | &b для кожної фази. 16 | aoneblock: 17 | bossbar: 18 | title: Блоки, що залишилися 19 | status: '&a Фазові блоки &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss Bar не активний для цього острова' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: [lifetime] 27 | description: встановити кількість блоків гравця 28 | set: '&a [name] встановлено значення [number]' 29 | set-lifetime: '&a [name] тривалість життя встановлено на [number]' 30 | setchest: 31 | parameters: 32 | description: поставити скриню, на яку дивляться, у фазу з указаною рідкістю 33 | chest-is-empty: '&c Ця скриня порожня, тому її неможливо додати' 34 | unknown-phase: '&c Невідома фаза. Використовуйте Tab-complete, щоб побачити їх' 35 | unknown-rarity: '&c Невідома рідкість. Використовуйте COMMON, UNCOMMON, RARE або EPIC' 36 | look-at-chest: '&c Подивіться на заповнену скриню, щоб встановити її' 37 | only-single-chest: '&c Можна встановити лише окремі скрині' 38 | success: '& Скриню успішно додано до фази' 39 | failure: '&c Скриня не може бути додана до фази! Перегляньте консоль для помилок' 40 | sanity: 41 | parameters: 42 | description: відобразити перевірку працездатності ймовірностей фази на консолі 43 | see-console: '&a Дивіться консоль для звіту' 44 | count: 45 | description: показати кількість блоків і фазу 46 | info: '&a Ви знаходитесь у блоці &b [number] у фазі &a [name].' 47 | info: 48 | count: >- 49 | &a Острів знаходиться на блоці &b [number]&a у фазі &b [name] &a. 50 | Підрахунок тривалості життя &b [lifetime] &a. 51 | phases: 52 | description: показати список усіх фаз 53 | title: '&2 OneBlock фази' 54 | name-syntax: '&a [name]' 55 | description-syntax: '&b [number] блоків' 56 | island: 57 | bossbar: 58 | description: перемикає фазу боса 59 | status_on: '&b Bossbar &a увімкнув' 60 | status_off: '&b Bossbar &c вимкнувся' 61 | setcount: 62 | parameters: 63 | description: встановити кількість блоків до попередньо завершеного значення 64 | set: '&a Лічильник встановлено на [number].' 65 | too-high: '&c Максимум, який ви можете встановити, це [number]!' 66 | respawn-block: 67 | description: відроджує магічний блок у ситуаціях, коли він зникає 68 | block-exist: '&a Блок існує, не потребує відновлення. Я позначив це для вас.' 69 | block-respawned: '& Блок відродився.' 70 | phase: 71 | insufficient-level: >- 72 | &c Рівень вашого острова занадто низький, щоб продовжити! Це має бути 73 | [number]. 74 | insufficient-funds: '&c Ваших коштів занадто мало, щоб продовжити! Вони мають бути [number].' 75 | insufficient-bank-balance: >- 76 | &c Баланс острівного банку занадто низький, щоб продовжити! Це має бути 77 | [number]. 78 | insufficient-permission: '&c Ви не можете продовжувати далі, доки не отримаєте дозвіл [name]!' 79 | cooldown: '&c Наступна фаза буде доступна через [number] секунд!' 80 | placeholders: 81 | infinite: Нескінченний 82 | gui: 83 | titles: 84 | phases: '&0&l Фази одного блоку' 85 | buttons: 86 | previous: 87 | name: '&f&l Попередня сторінка' 88 | description: '&7 Перейти на сторінку [number].' 89 | next: 90 | name: '&f&l Наступна сторінка' 91 | description: '&7 Перейти на сторінку [number].' 92 | phase: 93 | name: '&f&l [phase]' 94 | description: |- 95 | [starting-block] 96 | [biome] 97 | [bank] 98 | [economy] 99 | [level] 100 | [permission] 101 | starting-block: '&7 Запускається після розбиття &e [number] блоків.' 102 | biome: '&7 Біом: &e [biome]' 103 | bank: '&7 Потрібен &e $[number] &7 на банківському рахунку.' 104 | economy: '&7 Потрібен &e $[number] &7 в обліковому записі гравця.' 105 | level: '&7 Потрібен рівень острова &e [number] &7.' 106 | permission: '&7 Потрібен дозвіл `&e[permission]&7`.' 107 | blocks-prefix: Блоки по фазі - 108 | blocks: '&e [name], ' 109 | wrap-at: '50' 110 | tips: 111 | click-to-previous: '&e Натисніть &7, щоб переглянути попередню сторінку.' 112 | click-to-next: '&e Натисніть &7, щоб переглянути наступну сторінку.' 113 | click-to-change: '&e Натисніть &7, щоб змінити.' 114 | island: 115 | starting-hologram: |- 116 | &aЛаскаво просимо до AOneBlock 117 | &eРозбийте цей блок, щоб почати 118 | -------------------------------------------------------------------------------- /src/main/resources/locales/vi.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: Khởi đầu an toàn 5 | description: | 6 | &b Ngăn chặn người chơi mới 7 | &b Từ việc di chuyển trong 1 phút 8 | &b Vì vậy, họ không rơi ra. 9 | hint: '&c Chuyển động bị chặn để an toàn cho [number] thêm giây!' 10 | free-to-move: '&a Bạn có thể tự do di chuyển. ' 11 | ONEBLOCK_BOSSBAR: 12 | name: Boss Bar 13 | description: | 14 | &b Hiển thị một thanh trạng thái 15 | &b cho mỗi pha. 16 | aoneblock: 17 | bossbar: 18 | title: Khối còn lại 19 | status: '&a Khối pha &b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c Boss Bar không hoạt động cho hòn đảo này' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: 27 | description: chỉnh số đếm khối của người chơi 28 | set: '&a Số đếm khối của [name] được đặt thành [number]' 29 | set-lifetime: '&a Bộ đếm thời gian tồn tại của [name] được đặt thành [number]' 30 | setchest: 31 | parameters: <độ hiếm> 32 | description: thêm rương đang nhìn vào một giai đoạn với độ hiếm được chỉ định 33 | chest-is-empty: '&c Rương đó trống nên không thể thêm vào' 34 | unknown-phase: '&c Giai đoạn chưa biết. Dùng TAB để xem chúng' 35 | unknown-rarity: '&c Độ hiếm chưa biết. Sử dụng COMMON, UNCOMMON, RARE hoặc EPIC' 36 | look-at-chest: '&c Nhìn vào một cái rương đầy để đặt nó' 37 | only-single-chest: '&c Chỉ có thể đặt các rương đơn' 38 | success: '&a Rương được thêm thành công vào giai đoạn' 39 | failure: >- 40 | &c Rương không thể được thêm vào giai đoạn! Xem bảng điều khiển để 41 | biết lỗi 42 | sanity: 43 | parameters: 44 | description: >- 45 | hiển thị kiểm tra sự đúng đắn của xác suất giao đoạn lên bảng điều 46 | khiển 47 | see-console: '&a Xem bảng điều khiển cho báo cáo' 48 | count: 49 | description: hiển thị số khối và giai đoạn 50 | info: '&a Bạn đang ở trên khối &b [number] trong giai đoạn &a [name]' 51 | info: 52 | count: '&a Đảo nằm trên khối &b [number] &a trong giai đoạn &b [name]. ' 53 | phases: 54 | description: hiển thị một danh sách tất cả các giai đoạn 55 | title: '&2 Giai đoạn OneBlock' 56 | name-syntax: '&a [name]' 57 | description-syntax: '&b [number] khối' 58 | island: 59 | bossbar: 60 | description: bật thanh Boss giai đoạn 61 | status_on: '&b Bossbar &a bật lên' 62 | status_off: '&b Bossbar &c tắt' 63 | setcount: 64 | parameters: 65 | description: đặt số khối thành giá trị đã hoàn thành trước đó 66 | set: '&a Bộ đếm được đặt thành [number].' 67 | too-high: '&cMức tối đa bạn có thể đặt là[number]!' 68 | respawn-block: 69 | description: Block ma thuật hồi sinh trong các tình huống khi nó biến mất 70 | block-exist: '&a Khối tồn tại, không yêu cầu phản hồi. ' 71 | block-respawned: '&a Chặn hồi sinh.' 72 | phase: 73 | insufficient-level: Cấp đảo của bạn quá thấp để thực thi! Nó phải là [number]. 74 | insufficient-funds: Tài chính của bạn quá thấp để thực thi! Nó phải là [number]. 75 | insufficient-bank-balance: Ngân hàng đảo của bạn quá thấp để thực thi! Nó phải là [number]. 76 | insufficient-permission: Bạn không thể thực thi tiếp cho đến khi có quyền [name]! 77 | cooldown: Giai đoạn tiếp theo sẽ có sau [number] giây! 78 | placeholders: 79 | infinite: Vô hạn 80 | gui: 81 | titles: 82 | phases: '&0&l Giai đoạn OneBlock' 83 | buttons: 84 | previous: 85 | name: '&f&l Trang trước' 86 | description: '&7 Chuyển sang trang [number]' 87 | next: 88 | name: '&f&l Trang tiếp theo' 89 | description: '& Chuyển sang trang [number]' 90 | phase: 91 | name: '&f&l [phase]' 92 | description: |- 93 | [starting-block] 94 | [biome] 95 | [bank] 96 | [economy] 97 | [level] 98 | [permission] 99 | [blocks] 100 | starting-block: '&7 Bắt đầu sau khi phá vỡ &e [number] khối.' 101 | biome: '&7 Biome: &e [biome]' 102 | bank: '&7 Yêu cầu 7e $[number] &7 trong tài khoản ngân hàng.' 103 | economy: '&7 Yêu cầu &e $[number] &7 trong tài khoản người chơi.' 104 | level: '&7 Yêu cầu &e[number] &7 cấp đảo.' 105 | permission: '&7 Yêu cầu `&e[permission]&7` quyền.' 106 | blocks-prefix: '&7 Khối trong giai đoạn -' 107 | blocks: '&e [name], ' 108 | wrap-at: '50' 109 | tips: 110 | click-to-previous: '&e Bấm &7 để xem trang trước.' 111 | click-to-next: '&e Bấm &7 để xem trang tiếp theo.' 112 | click-to-change: '&e Bấm &7 để thay đổi.' 113 | island: 114 | starting-hologram: |- 115 | &aChào mừng đến với OneBlock 116 | &eĐập khối này để bắt đầu 117 | -------------------------------------------------------------------------------- /src/main/resources/locales/zh-CN.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: 开始安全 5 | description: | 6 | &b 防止新球员 7 | &b 从移动1分钟 8 | &b 所以他们不会掉下来。 9 | hint: '&c 移动被阻塞,以确保[number]更多秒!' 10 | free-to-move: '&a 您可以自由移动。' 11 | ONEBLOCK_BOSSBAR: 12 | name: 老板酒吧 13 | description: | 14 | &b 显示状态栏 15 | &b 对于每个阶段。 16 | aoneblock: 17 | bossbar: 18 | title: 剩余的块 19 | status: '&a 相位块&b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c 老板酒吧对这个岛不活跃' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: <玩家名称> <数量> 27 | description: 设置玩家挖掘的方块数 28 | set: '&a [name] 挖掘的方块数已设置为 [number]' 29 | set-lifetime: '&a [name] 的重置次数已设置为 [number]' 30 | setchest: 31 | parameters: <阶段> <稀有度> 32 | description: 将您光标指向的箱子添加到一个阶段中, 并选择稀有度 33 | chest-is-empty: '&c 该箱子无法添加, 因为它是空的' 34 | unknown-phase: '&c 未知阶段. 用 Tab 补全来查看所有阶段' 35 | unknown-rarity: '&c 未知稀有度. 可使用的有 COMMON, UNCOMMON, RARE 或 EPIC' 36 | look-at-chest: '&c 将光标指向一个包含物品的箱子来设置它' 37 | only-single-chest: '&c 只能设置单个箱子' 38 | success: '&a 成功将箱子添加到该阶段' 39 | failure: '&c 无法添加箱子到该阶段! 报错已在后台生成' 40 | sanity: 41 | parameters: <阶段> 42 | description: 在后台生成一份关于各阶段所占百分比的完整报告 43 | see-console: '&a 报告已在后台生成' 44 | count: 45 | description: 显示方块数量和阶段 46 | info: '&a 您当前挖掘的方块数量是 &b [number], 为 &a [name] 阶段' 47 | info: 48 | count: '&a 岛位于 &b [name] &a 阶段的 &b [number]&a 区块。生命周期计数 &b [lifetime] &a。' 49 | phases: 50 | description: 显示所有阶段的列表 51 | title: '&2 OneBlock 阶段' 52 | name-syntax: '&a [name]' 53 | description-syntax: '&b 挖掘了 [number] 个方块' 54 | island: 55 | bossbar: 56 | description: 切换相位栏 57 | status_on: '&b Bossbar turned &a on' 58 | status_off: '&b Bossbar turned &c off' 59 | setcount: 60 | parameters: 61 | description: 将块计数设置为先前完成的值 62 | set: '&a 数量设置为 [number].' 63 | too-high: '&c 你最大只能设置 [number]!' 64 | respawn-block: 65 | description: 在魔法块消失的情况下重生 66 | block-exist: '&a 块存在,不需要重生。我给你标记了。' 67 | block-respawned: '&a 块重生。' 68 | phase: 69 | insufficient-level: '&c 岛屿等级过低, 无法执行此操作! 等级必须达到 [number].' 70 | insufficient-funds: '&c 余额不足, 无法执行此操作! 余额应多于 [number].' 71 | insufficient-bank-balance: '&c 岛屿银行余额不足, 无法执行此操作! 余额应多于 [number].' 72 | insufficient-permission: '&c 在获得 [name] 许可之前,您不能继续操作!' 73 | cooldown: '&c [number] 秒后即可进入下一阶段!' 74 | placeholders: 75 | infinite: 无限 76 | gui: 77 | titles: 78 | phases: '&0&l OneBlock 阶段' 79 | buttons: 80 | previous: 81 | name: '&f&l 上一页' 82 | description: '&7 切换到[number]页' 83 | next: 84 | name: '&f&l 下一页' 85 | description: '&7 切换到[number]页' 86 | phase: 87 | name: '&f&l [phase]' 88 | description: |- 89 | [starting-block] 90 | [biome] 91 | [bank] 92 | [economy] 93 | [level] 94 | [permission] 95 | starting-block: '&7 在破坏 &e [number] 块后开始。' 96 | biome: '&7 生物群落:&e [biome]' 97 | bank: '&7 需要银行帐户中有 &e $[number] &7。' 98 | economy: '&7 需要玩家帐户中有 &e $[number] &7。' 99 | level: '&7 需要 &e [number] &7 岛屿等级。' 100 | permission: '&7 需要 `&e[permission]&7` 权限。' 101 | blocks-prefix: '&7 阶段块 - ' 102 | blocks: '&e [name], ' 103 | wrap-at: '50' 104 | tips: 105 | click-to-previous: '&e 单击&7 查看上一页。' 106 | click-to-next: '&e 单击 &7 查看下一页。' 107 | click-to-change: '&e 单击 &7 进行更改。' 108 | island: 109 | starting-hologram: |- 110 | &a欢迎来到 AOneBlock 111 | &e破坏此方块以开始 112 | -------------------------------------------------------------------------------- /src/main/resources/locales/zh-TW.yml: -------------------------------------------------------------------------------- 1 | protection: 2 | flags: 3 | START_SAFETY: 4 | name: 開始安全 5 | description: | 6 | &b 防止新球員 7 | &b 從移動1分鐘 8 | &b 所以他們不會掉下來。 9 | hint: '&c 移動被阻塞,以確保[number]更多秒!' 10 | free-to-move: '&a 您可以自由移動。當心!' 11 | ONEBLOCK_BOSSBAR: 12 | name: 老闆酒吧 13 | description: | 14 | &b 顯示狀態欄 15 | &b 對於每個階段。 16 | aoneblock: 17 | bossbar: 18 | title: 剩餘的塊 19 | status: '&a 相位塊&b [done] &d / &b [total]' 20 | color: RED 21 | style: SEGMENTED_20 22 | not-active: '&c 老闆酒吧對這個島不活躍' 23 | commands: 24 | admin: 25 | setcount: 26 | parameters: <名稱> <計數> 27 | description: 設置玩家的蓋帽數 28 | set: a [name]的計數設置為[number] 29 | set-lifetime: '&a [name] 的生命週期計數設定為 [number]' 30 | setchest: 31 | parameters: <階段> <稀有> 32 | description: 將所看的箱子放在指定稀有度的階段 33 | chest-is-empty: &c該箱子為空,因此無法添加 34 | unknown-phase: &c未知階段。使用製表符完成功能來查看它們 35 | unknown-rarity: &c未知稀有。使用COMMON,UNCOMMON,RARE或EPIC 36 | look-at-chest: &c看看裝滿的箱子 37 | only-single-chest: &c只能設置單個箱子 38 | success: '&a 箱子成功添加' 39 | failure: &c 無法將胸部添加到該階段! 請參閱控制台以獲取錯誤 40 | sanity: 41 | parameters: <階段> 42 | description: 在控制台中顯示相概率的健全性檢查 43 | see-console: &a請參閱控制台以獲取報告 44 | count: 45 | description: 顯示塊數和相位 46 | info: '&a您正在&a[name]]階段中阻止&b[number]' 47 | info: 48 | count: '&a 島位於 &b [names] &a 階段的 &b [number]&a 區塊。生命週期計數 &b [lifetime] &a。' 49 | phases: 50 | description: 顯示所有階段的列表 51 | title: &2 OneBlock階段 52 | name-syntax: '&a [name]' 53 | description-syntax: '&b [number]塊' 54 | island: 55 | bossbar: 56 | description: 切換相位欄 57 | status_on: '&b Bossbar&a 打開' 58 | status_off: '&b Bossbar&c 關閉' 59 | setcount: 60 | parameters: <計數> 61 | description: 將區塊計數設定為之前完成的值 62 | set: '&a 計數設定為 [number]。' 63 | too-high: '&c 您可以設定的最大值是[number]!' 64 | respawn-block: 65 | description: 在魔法塊消失的情況下重生 66 | block-exist: '&a 塊存在,不需要重生。我給你標記了。' 67 | block-respawned: '&a 塊重生。' 68 | phase: 69 | insufficient-level: '&c 你的島嶼等級太低,無法繼續!必須是[number]。' 70 | insufficient-funds: '&c 您的資金太低,無法繼續!他們必須是[數字]。' 71 | insufficient-bank-balance: '&c 島上銀行餘額太低,無法繼續!必須是[number]。' 72 | insufficient-permission: '&c 在獲得 [name] 許可之前,您不能繼續操作!' 73 | cooldown: '&c [number] 秒後即可進入下一階段!' 74 | placeholders: 75 | infinite: 無窮 76 | gui: 77 | titles: 78 | phases: '&0&l OneBlock 階段' 79 | buttons: 80 | previous: 81 | name: '&f&l 上一頁' 82 | description: '&7 切換到[number]頁' 83 | next: 84 | name: '&f&l 下一頁' 85 | description: '&7 切換到[number]頁' 86 | phase: 87 | name: '&f&l [階段]' 88 | description: |- 89 | [starting-block] 90 | [biome] 91 | [bank] 92 | [economy] 93 | [level] 94 | [permission] 95 | starting-block: '&7 在破壞 &e [number] 區塊後開始。' 96 | biome: '&7 生物群落:&e [biome]' 97 | bank: '&7 需要銀行帳戶中有 &e $[number] &7。' 98 | economy: '&7 需要玩家帳號中有 &e $[number] &7。' 99 | level: '&7 需要 &e [number] &7 島嶼等級。' 100 | permission: '&7 需要 `&e[permission]&7` 權限。' 101 | blocks-prefix: '&7 階段塊 - ' 102 | blocks: '&e [name], ' 103 | wrap-at: '50' 104 | tips: 105 | click-to-previous: '&e 點選&7 查看上一頁。' 106 | click-to-next: '&e 點選&7 查看下一頁。' 107 | click-to-change: '&e 點選 &7 進行更改。' 108 | island: 109 | starting-hologram: |- 110 | &a歡迎來到 AOneBlock 111 | 打破此區塊以開始(&E) 112 | -------------------------------------------------------------------------------- /src/main/resources/panels/phases_panel.yml: -------------------------------------------------------------------------------- 1 | phases_panel: 2 | title: aoneblock.gui.titles.phases 3 | type: INVENTORY 4 | background: 5 | icon: BLACK_STAINED_GLASS_PANE 6 | title: "&b&r" # Empty text 7 | border: 8 | icon: BLACK_STAINED_GLASS_PANE 9 | title: "&b&r" # Empty text 10 | force-shown: [] 11 | content: 12 | 2: 13 | 2: phase_button 14 | 3: phase_button 15 | 4: phase_button 16 | 5: phase_button 17 | 6: phase_button 18 | 7: phase_button 19 | 8: phase_button 20 | # In this case, the icon is defined as a TIPPED_ARROW with a color. 21 | # CustomPotionColor uses the Decimal description of a Color, just as leather armor does. 22 | # All you need to do is take a hex code of a color (like #ff00aa) which represents red, 23 | # green, blue as 2 hex digits each and convert that number into a decimal, using a hex to decimal calculator. 24 | 3: 25 | 1: 26 | icon: tipped_arrow[potion_contents={custom_color:11546150}] 27 | title: aoneblock.gui.buttons.previous.name 28 | description: aoneblock.gui.buttons.previous.description 29 | data: 30 | type: PREVIOUS 31 | indexing: true 32 | actions: 33 | previous: 34 | click-type: LEFT 35 | tooltip: aoneblock.gui.tips.click-to-previous 36 | 2: phase_button 37 | 3: phase_button 38 | 4: phase_button 39 | 5: phase_button 40 | 6: phase_button 41 | 7: phase_button 42 | 8: phase_button 43 | 9: 44 | icon: tipped_arrow[potion_contents={custom_color:8439583}] 45 | title: aoneblock.gui.buttons.next.name 46 | description: aoneblock.gui.buttons.next.description 47 | data: 48 | type: NEXT 49 | indexing: true 50 | actions: 51 | next: 52 | click-type: LEFT 53 | tooltip: aoneblock.gui.tips.click-to-next 54 | 4: 55 | 2: phase_button 56 | 3: phase_button 57 | 4: phase_button 58 | 5: phase_button 59 | 6: phase_button 60 | 7: phase_button 61 | 8: phase_button 62 | reusable: 63 | phase_button: 64 | # icon: PLAYER_HEAD 65 | # title: aoneblock.gui.buttons.phase.name 66 | # description: aoneblock.gui.buttons.phase.description 67 | data: 68 | type: PHASE 69 | actions: 70 | select: 71 | click-type: LEFT 72 | tooltip: aoneblock.gui.tips.click-to-change -------------------------------------------------------------------------------- /src/main/resources/phases/0_plains.yml: -------------------------------------------------------------------------------- 1 | '0': 2 | name: Plains 3 | # Icon in Phase GUI's. Icon uses BentoBox ItemParser: https://docs.bentobox.world/en/latest/BentoBox/ItemParser/ 4 | # It supports Custom Player heads and any displayable item. 5 | icon: GRASS_BLOCK 6 | # List of blocks that will generate at these specific block counts. 7 | # The numbers are relative to the phase and not the overall player's count. 8 | # If you define 0 here, then firstBlock is not required and firstBlock will be replaced with this block. 9 | fixedBlocks: 10 | 0: GRASS_BLOCK 11 | 1: GRASS_BLOCK 12 | 2: GRASS_BLOCK 13 | 3: OAK_LOG 14 | 4: OAK_LOG 15 | 5: OAK_LOG 16 | 50: SPONGE 17 | # Hologram Lines to Display 18 | # The First (Before Phase 1) Hologram is Located in your Locale. 19 | holograms: 20 | 0: "&aGood Luck!" 21 | biome: PLAINS 22 | # Commands 23 | # A list of commands can be run at the start and end of a phase. Commands are run as the Console 24 | # unless the command is prefixed with [SUDO], then the command is run as the player 25 | # triggering the commands. 26 | # These placeholders in the command string will be replaced with the appropriate value: 27 | # [island] - Island name 28 | # [owner] - Island owner's name 29 | # [player] - The name of the player who broke the block triggering the commands 30 | # [phase] - the name of this phase 31 | # [blocks] - the number of blocks broken 32 | # [level] - your island level (Requires Levels Addon) 33 | # [bank-balance] - your island bank balance (Requires Bank Addon) 34 | # [eco-balance] - player's economy balance (Requires Vault and an economy plugin) 35 | # 36 | # Examples: 37 | # start-commands: 38 | # - 'give [player] WOODEN_AXE 1' 39 | # - 'broadcast [player] just started OneBlock!' 40 | # end-commands: 41 | # - '[SUDO]summon minecraft:wither' 42 | # These are run only the first time a phase is completed 43 | # end-commands-first-time: 44 | # - 'broadcast &c&l[!] &b[player] &fhas completed the &d&n[phase]&f phase for the first time.' 45 | # 46 | # Requirements 47 | # You can stipulate a set of requirements to start the phase: 48 | # 49 | # economy-balance - the minimum player's economy balance (Requires Vault and an economy plugin) 50 | # bank-balance - the minimum island bank balance (requires Bank Addon) 51 | # level - the island level (Requires Levels Addon) 52 | # permission - a permission string 53 | # 54 | # Example: 55 | # requirements: 56 | # bank-balance: 10000 57 | # level: 10 58 | # permission: ready.for.battle 59 | # cooldown: 60 # seconds 60 | 61 | blocks: 62 | PODZOL: 40 63 | MYCELIUM: 40 64 | BIRCH_LEAVES: 100 65 | IRON_ORE: 300 66 | CHEST: 200 67 | BEE_NEST: 20 68 | OAK_LOG: 2000 69 | DIRT: 1000 70 | ANDESITE: 100 71 | INFESTED_STONE: 40 72 | DARK_OAK_LOG: 300 73 | OAK_LEAVES: 1000 74 | BROWN_MUSHROOM_BLOCK: 100 75 | DIORITE: 100 76 | COAL_ORE: 700 77 | GRAVEL: 100 78 | DIAMOND_ORE: 30 79 | GOLD_ORE: 30 80 | GRASS_BLOCK: 2000 81 | DARK_OAK_LEAVES: 100 82 | BIRCH_LOG: 500 83 | COBBLESTONE: 800 84 | SAND: 200 85 | GRANITE: 400 86 | COARSE_DIRT: 100 87 | STONE: 800 88 | CLAY: 40 89 | EMERALD_ORE: 10 90 | DIRT_PATH: 100 91 | COPPER_ORE: 200 92 | mobs: 93 | COW: 150 94 | SPIDER: 75 95 | SHEEP: 75 96 | PIG: 150 97 | VILLAGER: 15 98 | CHICKEN: 200 99 | -------------------------------------------------------------------------------- /src/main/resources/phases/0_plains_chests.yml: -------------------------------------------------------------------------------- 1 | '0': 2 | chests: 3 | '1': 4 | contents: 5 | 1: 6 | ==: org.bukkit.inventory.ItemStack 7 | v: 2230 8 | type: DANDELION 9 | 4: 10 | ==: org.bukkit.inventory.ItemStack 11 | v: 2230 12 | type: OXEYE_DAISY 13 | 22: 14 | ==: org.bukkit.inventory.ItemStack 15 | v: 2230 16 | type: POPPY 17 | 7: 18 | ==: org.bukkit.inventory.ItemStack 19 | v: 2230 20 | type: PEONY 21 | 11: 22 | ==: org.bukkit.inventory.ItemStack 23 | v: 2230 24 | type: OAK_FENCE 25 | amount: 16 26 | 14: 27 | ==: org.bukkit.inventory.ItemStack 28 | v: 2230 29 | type: OAK_FENCE_GATE 30 | rarity: COMMON 31 | '2': 32 | contents: 33 | 0: 34 | ==: org.bukkit.inventory.ItemStack 35 | v: 2230 36 | type: SUNFLOWER 37 | 4: 38 | ==: org.bukkit.inventory.ItemStack 39 | v: 2230 40 | type: LILAC 41 | 26: 42 | ==: org.bukkit.inventory.ItemStack 43 | v: 2230 44 | type: PINK_TULIP 45 | 11: 46 | ==: org.bukkit.inventory.ItemStack 47 | v: 2230 48 | type: LEAD 49 | 14: 50 | ==: org.bukkit.inventory.ItemStack 51 | v: 2230 52 | type: LEATHER 53 | amount: 8 54 | rarity: COMMON 55 | '3': 56 | contents: 57 | 4: 58 | ==: org.bukkit.inventory.ItemStack 59 | v: 2230 60 | type: FEATHER 61 | amount: 3 62 | 22: 63 | ==: org.bukkit.inventory.ItemStack 64 | v: 2230 65 | type: RED_TULIP 66 | 26: 67 | ==: org.bukkit.inventory.ItemStack 68 | v: 2230 69 | type: LILY_OF_THE_VALLEY 70 | 11: 71 | ==: org.bukkit.inventory.ItemStack 72 | v: 2230 73 | type: LADDER 74 | amount: 32 75 | 14: 76 | ==: org.bukkit.inventory.ItemStack 77 | v: 2230 78 | type: SUGAR_CANE 79 | rarity: COMMON 80 | '4': 81 | contents: 82 | 0: 83 | ==: org.bukkit.inventory.ItemStack 84 | v: 2230 85 | type: ENCHANTED_BOOK 86 | meta: 87 | ==: ItemMeta 88 | meta-type: ENCHANTED 89 | stored-enchants: 90 | PROTECTION_FALL: 1 91 | 1: 92 | ==: org.bukkit.inventory.ItemStack 93 | v: 2230 94 | type: ENCHANTED_BOOK 95 | meta: 96 | ==: ItemMeta 97 | meta-type: ENCHANTED 98 | stored-enchants: 99 | PROTECTION_FIRE: 1 100 | 2: 101 | ==: org.bukkit.inventory.ItemStack 102 | v: 2230 103 | type: ENCHANTED_BOOK 104 | meta: 105 | ==: ItemMeta 106 | meta-type: ENCHANTED 107 | stored-enchants: 108 | PROTECTION_ENVIRONMENTAL: 1 109 | 3: 110 | ==: org.bukkit.inventory.ItemStack 111 | v: 2230 112 | type: EXPERIENCE_BOTTLE 113 | 4: 114 | ==: org.bukkit.inventory.ItemStack 115 | v: 2230 116 | type: EMERALD 117 | rarity: UNCOMMON 118 | '5': 119 | contents: 120 | 0: 121 | ==: org.bukkit.inventory.ItemStack 122 | v: 2230 123 | type: LAPIS_LAZULI 124 | amount: 2 125 | 16: 126 | ==: org.bukkit.inventory.ItemStack 127 | v: 2230 128 | type: ALLIUM 129 | 18: 130 | ==: org.bukkit.inventory.ItemStack 131 | v: 2230 132 | type: COMPOSTER 133 | 12: 134 | ==: org.bukkit.inventory.ItemStack 135 | v: 2230 136 | type: APPLE 137 | 14: 138 | ==: org.bukkit.inventory.ItemStack 139 | v: 2230 140 | type: BEETROOT_SEEDS 141 | rarity: UNCOMMON 142 | '6': 143 | contents: 144 | 13: 145 | ==: org.bukkit.inventory.ItemStack 146 | v: 2230 147 | type: ICE 148 | rarity: RARE 149 | -------------------------------------------------------------------------------- /src/main/resources/phases/10500_deep_dark.yml: -------------------------------------------------------------------------------- 1 | '10500': 2 | name: Deep Dark 3 | firstBlock: DEEPSLATE 4 | biome: DEEP_DARK 5 | fixedBlocks: {} 6 | blocks: 7 | PACKED_ICE: 10 8 | BLUE_ICE: 10 9 | CHISELED_DEEPSLATE: 50 10 | SCULK_SENSOR: 10 11 | GRAY_WOOL: 5 12 | DEEPSLATE_COAL_ORE: 100 13 | DIRT: 100 14 | CRACKED_DEEPSLATE_TILES: 10 15 | SOUL_SAND: 10 16 | DEEPSLATE_GOLD_ORE: 50 17 | BLUE_WOOL: 10 18 | DEEPSLATE_REDSTONE_ORE: 10 19 | ICE: 10 20 | DARK_OAK_LOG: 10 21 | REINFORCED_DEEPSLATE: 5 22 | POLISHED_DEEPSLATE: 10 23 | DEEPSLATE: 2000 24 | POLISHED_BASALT: 10 25 | BLACKSTONE: 100 26 | DEEPSLATE_IRON_ORE: 100 27 | DEEPSLATE_COPPER_ORE: 100 28 | CRACKED_DEEPSLATE_BRICKS: 10 29 | COBBLED_DEEPSLATE: 50 30 | STONE: 100 31 | DEEPSLATE_EMERALD_ORE: 30 32 | DEEPSLATE_DIAMOND_ORE: 5 33 | COBBLESTONE: 250 34 | DEEPSLATE_LAPIS_ORE: 20 35 | CYAN_WOOL: 10 36 | TARGET: 5 37 | CHEST: 110 38 | mobs: 39 | WARDEN: 1 40 | holograms: {} 41 | start-commands: [] 42 | end-commands: [] 43 | -------------------------------------------------------------------------------- /src/main/resources/phases/11500_the end.yml: -------------------------------------------------------------------------------- 1 | '11500': 2 | name: The End 3 | firstBlock: END_STONE 4 | biome: THE_END 5 | blocks: 6 | PURPUR_BLOCK: 500 7 | END_STONE_BRICKS: 100 8 | PURPLE_WOOL: 50 9 | OBSIDIAN: 250 10 | END_STONE: 1000 11 | CHEST: 200 12 | PURPLE_TERRACOTTA: 100 13 | PURPUR_PILLAR: 100 14 | mobs: 15 | SHULKER: 80 16 | ENDERMAN: 500 17 | -------------------------------------------------------------------------------- /src/main/resources/phases/12000_goto_0.yml: -------------------------------------------------------------------------------- 1 | '12000': 2 | gotoBlock: 0 -------------------------------------------------------------------------------- /src/main/resources/phases/2000_winter.yml: -------------------------------------------------------------------------------- 1 | '2000': 2 | name: Winter 3 | firstBlock: SNOW_BLOCK 4 | biome: SNOWY_TAIGA 5 | blocks: 6 | COBBLESTONE: 900 7 | SAND: 100 8 | DIRT: 200 9 | STONE: 1000 10 | SPRUCE_LEAVES: 500 11 | STRIPPED_SPRUCE_LOG: 200 12 | ICE: 100 13 | GOLD_ORE: 80 14 | LAPIS_ORE: 80 15 | CHEST: 150 16 | SPRUCE_LOG: 500 17 | SNOW_BLOCK: 1000 18 | mobs: 19 | COW: 10 20 | STRAY: 150 21 | ZOMBIE: 200 22 | SPIDER: 40 23 | SHEEP: 10 24 | ENDERMAN: 10 25 | WOLF: 100 26 | SNOW_GOLEM: 30 27 | SKELETON: 100 28 | POLAR_BEAR: 10 29 | PIG: 10 30 | CREEPER: 30 31 | RABBIT: 50 32 | CHICKEN: 10 33 | GOAT: 10 34 | -------------------------------------------------------------------------------- /src/main/resources/phases/2000_winter_chests.yml: -------------------------------------------------------------------------------- 1 | '2000': 2 | chests: 3 | '1': 4 | contents: 5 | 0: 6 | ==: org.bukkit.inventory.ItemStack 7 | v: 2230 8 | type: CHAINMAIL_CHESTPLATE 9 | 1: 10 | ==: org.bukkit.inventory.ItemStack 11 | v: 2230 12 | type: CHAINMAIL_HELMET 13 | 2: 14 | ==: org.bukkit.inventory.ItemStack 15 | v: 2230 16 | type: CHAINMAIL_LEGGINGS 17 | 3: 18 | ==: org.bukkit.inventory.ItemStack 19 | v: 2230 20 | type: CHAINMAIL_BOOTS 21 | rarity: COMMON 22 | '2': 23 | contents: 24 | 0: 25 | ==: org.bukkit.inventory.ItemStack 26 | v: 2230 27 | type: CYAN_BED 28 | 24: 29 | ==: org.bukkit.inventory.ItemStack 30 | v: 2230 31 | type: EXPERIENCE_BOTTLE 32 | amount: 2 33 | 12: 34 | ==: org.bukkit.inventory.ItemStack 35 | v: 2230 36 | type: EXPERIENCE_BOTTLE 37 | amount: 2 38 | rarity: COMMON 39 | '3': 40 | contents: 41 | 0: 42 | ==: org.bukkit.inventory.ItemStack 43 | v: 2230 44 | type: CHARCOAL 45 | amount: 64 46 | 11: 47 | ==: org.bukkit.inventory.ItemStack 48 | v: 2230 49 | type: GRINDSTONE 50 | 13: 51 | ==: org.bukkit.inventory.ItemStack 52 | v: 2230 53 | type: IRON_INGOT 54 | amount: 4 55 | rarity: COMMON 56 | '4': 57 | contents: 58 | 13: 59 | ==: org.bukkit.inventory.ItemStack 60 | v: 2230 61 | type: DAMAGED_ANVIL 62 | rarity: UNCOMMON 63 | '5': 64 | contents: 65 | 3: 66 | ==: org.bukkit.inventory.ItemStack 67 | v: 2230 68 | type: EMERALD 69 | 5: 70 | ==: org.bukkit.inventory.ItemStack 71 | v: 2230 72 | type: EMERALD 73 | 21: 74 | ==: org.bukkit.inventory.ItemStack 75 | v: 2230 76 | type: EMERALD 77 | 23: 78 | ==: org.bukkit.inventory.ItemStack 79 | v: 2230 80 | type: EMERALD 81 | 13: 82 | ==: org.bukkit.inventory.ItemStack 83 | v: 2230 84 | type: IRON_INGOT 85 | amount: 4 86 | rarity: UNCOMMON 87 | '6': 88 | contents: 89 | 11: 90 | ==: org.bukkit.inventory.ItemStack 91 | v: 2230 92 | type: IRON_INGOT 93 | amount: 4 94 | 14: 95 | ==: org.bukkit.inventory.ItemStack 96 | v: 2230 97 | type: ENCHANTED_BOOK 98 | meta: 99 | ==: ItemMeta 100 | meta-type: ENCHANTED 101 | stored-enchants: 102 | PIERCING: 2 103 | rarity: RARE 104 | '7': 105 | contents: 106 | 11: 107 | ==: org.bukkit.inventory.ItemStack 108 | v: 2230 109 | type: ENCHANTED_BOOK 110 | meta: 111 | ==: ItemMeta 112 | meta-type: ENCHANTED 113 | stored-enchants: 114 | MENDING: 1 115 | 14: 116 | ==: org.bukkit.inventory.ItemStack 117 | v: 2230 118 | type: EXPERIENCE_BOTTLE 119 | amount: 8 120 | rarity: RARE 121 | '8': 122 | contents: 123 | 3: 124 | ==: org.bukkit.inventory.ItemStack 125 | v: 2230 126 | type: IRON_INGOT 127 | 4: 128 | ==: org.bukkit.inventory.ItemStack 129 | v: 2230 130 | type: IRON_INGOT 131 | 5: 132 | ==: org.bukkit.inventory.ItemStack 133 | v: 2230 134 | type: IRON_INGOT 135 | 21: 136 | ==: org.bukkit.inventory.ItemStack 137 | v: 2230 138 | type: IRON_INGOT 139 | 22: 140 | ==: org.bukkit.inventory.ItemStack 141 | v: 2230 142 | type: IRON_INGOT 143 | 23: 144 | ==: org.bukkit.inventory.ItemStack 145 | v: 2230 146 | type: IRON_INGOT 147 | 12: 148 | ==: org.bukkit.inventory.ItemStack 149 | v: 2230 150 | type: IRON_INGOT 151 | 13: 152 | ==: org.bukkit.inventory.ItemStack 153 | v: 2230 154 | type: MUSIC_DISC_CAT 155 | 14: 156 | ==: org.bukkit.inventory.ItemStack 157 | v: 2230 158 | type: IRON_INGOT 159 | rarity: EPIC 160 | -------------------------------------------------------------------------------- /src/main/resources/phases/3000_ocean.yml: -------------------------------------------------------------------------------- 1 | '3000': 2 | name: Ocean 3 | firstBlock: PRISMARINE 4 | biome: OCEAN 5 | blocks: 6 | HORN_CORAL_BLOCK: 100 7 | CHEST: 200 8 | DIRT: 200 9 | ANDESITE: 500 10 | BRAIN_CORAL_BLOCK: 100 11 | SANDSTONE: 300 12 | RED_SAND: 10 13 | DEAD_HORN_CORAL_BLOCK: 10 14 | WET_SPONGE: 10 15 | BUBBLE_CORAL_BLOCK: 100 16 | GRAVEL: 400 17 | DEAD_BUBBLE_CORAL_BLOCK: 100 18 | PRISMARINE: 500 19 | GLOWSTONE: 50 20 | TUBE_CORAL_BLOCK: 100 21 | SAND: 1000 22 | GRANITE: 500 23 | STONE: 500 24 | FIRE_CORAL_BLOCK: 100 25 | CLAY: 300 26 | SPONGE: 100 27 | DARK_PRISMARINE: 100 28 | DEAD_BRAIN_CORAL_BLOCK: 10 29 | SEA_LANTERN: 100 30 | SUSPICIOUS_SAND: 100 31 | SUSPICIOUS_GRAVEL: 100 32 | mobs: 33 | COD: 100 34 | TROPICAL_FISH: 100 35 | DOLPHIN: 10 36 | SALMON: 100 37 | TURTLE: 10 38 | SQUID: 100 39 | DROWNED: 600 40 | FROG: 10 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/phases/4000_jungle.yml: -------------------------------------------------------------------------------- 1 | '4000': 2 | name: Jungle 3 | firstBlock: MELON 4 | biome: JUNGLE 5 | blocks: 6 | PODZOL: 100 7 | COAL_ORE: 100 8 | MYCELIUM: 100 9 | GRAVEL: 50 10 | DIAMOND_ORE: 10 11 | PUMPKIN: 50 12 | GOLD_ORE: 100 13 | GRASS_BLOCK: 200 14 | JUNGLE_LEAVES: 500 15 | CHEST: 100 16 | JUNGLE_LOG: 500 17 | COBBLESTONE: 100 18 | COARSE_DIRT: 100 19 | STRIPPED_JUNGLE_LOG: 100 20 | DIRT: 100 21 | STONE: 500 22 | MELON: 20 23 | EMERALD_ORE: 40 24 | LAPIS_ORE: 50 25 | SUSPICIOUS_GRAVEL: 30 26 | mobs: 27 | WITCH: 100 28 | PARROT: 50 29 | SKELETON: 100 30 | ZOMBIE: 100 31 | OCELOT: 30 32 | CREEPER: 20 33 | ENDERMAN: 10 34 | PANDA: 5 35 | CHICKEN: 20 36 | FROG: 5 37 | -------------------------------------------------------------------------------- /src/main/resources/phases/5000_swamp.yml: -------------------------------------------------------------------------------- 1 | '5000': 2 | name: Swamp 3 | firstBlock: GRASS_BLOCK 4 | biome: SWAMP 5 | blocks: 6 | COAL_ORE: 50 7 | GRAVEL: 40 8 | DIAMOND_ORE: 2 9 | GOLD_ORE: 10 10 | GRASS_BLOCK: 100 11 | CHEST: 50 12 | COBBLESTONE: 70 13 | COARSE_DIRT: 10 14 | OAK_LOG: 100 15 | DIRT: 100 16 | STONE: 10 17 | OAK_LEAVES: 100 18 | CLAY: 100 19 | EMERALD_ORE: 5 20 | LAPIS_ORE: 10 21 | mobs: 22 | WITCH: 50 23 | ZOMBIE: 100 24 | SKELETON: 100 25 | ZOMBIE_VILLAGER: 10 26 | CAT: 20 27 | SLIME: 100 28 | VILLAGER: 10 29 | EVOKER: 2 30 | CHICKEN: 20 31 | TADPOLE: 20 32 | FROG: 40 33 | -------------------------------------------------------------------------------- /src/main/resources/phases/6000_dungeon.yml: -------------------------------------------------------------------------------- 1 | '6000': 2 | name: Dungeon 3 | firstBlock: CHEST 4 | biome: DARK_FOREST 5 | blocks: 6 | COAL_ORE: 2 7 | GRAVEL: 2 8 | REDSTONE_ORE: 1 9 | DIAMOND_ORE: 1 10 | INFESTED_COBBLESTONE: 1 11 | GOLD_ORE: 1 12 | IRON_ORE: 2 13 | COPPER_ORE: 2 14 | DEEPSLATE: 1 15 | CHEST: 2 16 | COBBLESTONE: 3 17 | OAK_PLANKS: 2 18 | SAND: 2 19 | GRANITE: 2 20 | DIRT: 2 21 | STONE: 4 22 | ANDESITE: 2 23 | INFESTED_STONE: 1 24 | SANDSTONE: 2 25 | EMERALD_ORE: 1 26 | BROWN_MUSHROOM_BLOCK: 1 27 | LAPIS_ORE: 1 28 | DIORITE: 2 29 | RED_MUSHROOM_BLOCK: 1 30 | MOSSY_COBBLESTONE: 2 31 | AMETHYST_BLOCK: 1 32 | CALCITE: 1 33 | SMOOTH_BASALT: 1 34 | mobs: 35 | CAVE_SPIDER: 3 36 | WITCH: 1 37 | ZOMBIE: 6 38 | SKELETON: 4 39 | CREEPER: 1 40 | ENDERMAN: 1 41 | BAT: 3 42 | AXOLOTL: 1 43 | GLOW_SQUID: 1 44 | -------------------------------------------------------------------------------- /src/main/resources/phases/7000_desert.yml: -------------------------------------------------------------------------------- 1 | '7000': 2 | name: Desert 3 | firstBlock: SAND 4 | biome: DESERT 5 | blocks: 6 | SAND: 1000 7 | STONE: 200 8 | RED_SANDSTONE: 100 9 | SANDSTONE: 500 10 | RED_SAND: 100 11 | CHEST: 100 12 | SUSPICIOUS_SAND: 20 13 | mobs: 14 | ZOMBIE: 30 15 | SKELETON: 50 16 | SPIDER: 50 17 | HUSK: 100 18 | CREEPER: 10 19 | ENDERMAN: 10 20 | RABBIT: 50 21 | -------------------------------------------------------------------------------- /src/main/resources/phases/700_underground.yml: -------------------------------------------------------------------------------- 1 | '700': 2 | name: Underground 3 | # List of blocks that will generate at these specific block counts. 4 | # The numbers are relative to the phase and not the overall player's count. 5 | # If you define 0 here, then firstBlock is not required and firstBlock will be replaced with this block. 6 | fixedBlocks: 7 | 0: STONE 8 | 10: COAL_ORE 9 | 20: IRON_ORE 10 | biome: TAIGA 11 | blocks: 12 | AMETHYST_BLOCK: 30 13 | CALCITE: 30 14 | SMOOTH_BASALT: 30 15 | DEEPSLATE: 40 16 | COAL_ORE: 300 17 | GRAVEL: 200 18 | COPPER_ORE: 200 19 | REDSTONE_ORE: 60 20 | DIAMOND_ORE: 30 21 | GOLD_ORE: 100 22 | IRON_ORE: 300 23 | CHEST: 100 24 | COBBLESTONE: 800 25 | SAND: 100 26 | GRANITE: 100 27 | COBWEB: 250 28 | DIRT: 500 29 | STONE: 1000 30 | OBSIDIAN: 10 31 | ANDESITE: 200 32 | SANDSTONE: 100 33 | EMERALD_ORE: 5 34 | LAPIS_ORE: 20 35 | DIORITE: 200 36 | mobs: 37 | CAVE_SPIDER: 40 38 | ZOMBIE: 300 39 | SKELETON: 200 40 | CREEPER: 30 41 | ENDERMAN: 20 42 | BAT: 30 43 | AXOLOTL: 1 44 | GLOW_SQUID: 1 45 | -------------------------------------------------------------------------------- /src/main/resources/phases/7500_the nether.yml: -------------------------------------------------------------------------------- 1 | '7500': 2 | name: The Nether 3 | firstBlock: NETHERRACK 4 | biome: NETHER_WASTES 5 | blocks: 6 | ANCIENT_DEBRIS: 25 7 | BASALT: 200 8 | BLACKSTONE: 100 9 | BONE_BLOCK: 60 10 | CRIMSON_NYLIUM: 100 11 | WARPED_NYLIUM: 100 12 | SHROOMLIGHT: 30 13 | SOUL_SOIL: 100 14 | CRIMSON_STEM: 100 15 | WARPED_STEM: 100 16 | NETHER_WART_BLOCK: 60 17 | WARPED_WART_BLOCK: 60 18 | NETHER_GOLD_ORE: 300 19 | GRAVEL: 300 20 | NETHER_QUARTZ_ORE: 300 21 | NETHERRACK: 1000 22 | SOUL_SAND: 100 23 | RED_NETHER_BRICKS: 25 24 | NETHER_BRICKS: 50 25 | CHEST: 100 26 | GLOWSTONE: 100 27 | MAGMA_BLOCK: 75 28 | GOLD_BLOCK: 10 29 | mobs: 30 | PIGLIN: 300 31 | HOGLIN: 100 32 | PIGLIN_BRUTE: 20 33 | SKELETON: 50 34 | MAGMA_CUBE: 100 35 | GHAST: 20 36 | ZOMBIFIED_PIGLIN: 300 37 | ENDERMAN: 20 38 | BLAZE: 200 39 | WITHER_SKELETON: 20 40 | -------------------------------------------------------------------------------- /src/main/resources/phases/8500_plenty.yml: -------------------------------------------------------------------------------- 1 | '8500': 2 | name: Plenty 3 | firstBlock: HAY_BLOCK 4 | biome: PLAINS 5 | blocks: 6 | PODZOL: 1 7 | REDSTONE_ORE: 1 8 | HONEYCOMB_BLOCK: 1 9 | LIME_TERRACOTTA: 1 10 | HONEY_BLOCK: 1 11 | GREEN_TERRACOTTA: 1 12 | MAGENTA_TERRACOTTA: 1 13 | RED_TERRACOTTA: 1 14 | IRON_ORE: 1 15 | CHEST: 2 16 | POLISHED_ANDESITE: 1 17 | SPRUCE_LOG: 1 18 | JUNGLE_LOG: 1 19 | WHITE_TERRACOTTA: 1 20 | TERRACOTTA: 1 21 | OAK_LOG: 1 22 | DARK_OAK_LOG: 1 23 | LAPIS_ORE: 1 24 | COAL_ORE: 1 25 | ORANGE_TERRACOTTA: 1 26 | DIAMOND_ORE: 1 27 | PUMPKIN: 1 28 | GOLD_ORE: 1 29 | GRASS_BLOCK: 1 30 | YELLOW_TERRACOTTA: 1 31 | LIGHT_BLUE_TERRACOTTA: 1 32 | ACACIA_LOG: 1 33 | BIRCH_LOG: 1 34 | JACK_O_LANTERN: 1 35 | PURPLE_TERRACOTTA: 1 36 | POLISHED_GRANITE: 1 37 | HAY_BLOCK: 1 38 | CYAN_TERRACOTTA: 1 39 | STONE: 1 40 | POLISHED_DIORITE: 1 41 | MELON: 1 42 | PINK_TERRACOTTA: 1 43 | DARK_PRISMARINE: 1 44 | EMERALD_ORE: 1 45 | DIRT_PATH: 1 46 | LIGHT_GRAY_TERRACOTTA: 1 47 | SUSPICIOUS_SAND: 1 48 | mobs: 49 | COW: 1 50 | DONKEY: 1 51 | SHEEP: 1 52 | FOX: 1 53 | PIG: 1 54 | BEE: 3 55 | HORSE: 1 56 | CAT: 1 57 | VILLAGER: 1 58 | RABBIT: 1 59 | CHICKEN: 1 60 | ALLAY: 1 61 | 62 | -------------------------------------------------------------------------------- /src/main/resources/phases/9500_desolation.yml: -------------------------------------------------------------------------------- 1 | '9500': 2 | name: Desolation 3 | firstBlock: OBSIDIAN 4 | biome: BADLANDS 5 | blocks: 6 | PODZOL: 10 7 | MYCELIUM: 10 8 | STRIPPED_OAK_WOOD: 10 9 | STRIPPED_OAK_LOG: 10 10 | STRIPPED_SPRUCE_LOG: 10 11 | CHEST: 8 12 | CRACKED_STONE_BRICKS: 10 13 | DAMAGED_ANVIL: 1 14 | INFESTED_CHISELED_STONE_BRICKS: 10 15 | TERRACOTTA: 1 16 | OBSIDIAN: 10 17 | ANDESITE: 10 18 | INFESTED_STONE: 10 19 | BLACK_CONCRETE: 10 20 | MOSSY_STONE_BRICKS: 10 21 | DIORITE: 10 22 | INFESTED_STONE_BRICKS: 10 23 | GRAVEL: 10 24 | DEAD_BUBBLE_CORAL_BLOCK: 10 25 | INFESTED_COBBLESTONE: 10 26 | STONE_BRICKS: 10 27 | INFESTED_CRACKED_STONE_BRICKS: 10 28 | COBBLESTONE: 10 29 | GRANITE: 1 30 | COARSE_DIRT: 10 31 | STONE: 10 32 | STRIPPED_SPRUCE_WOOD: 10 33 | STRIPPED_DARK_OAK_LOG: 10 34 | BLACK_STAINED_GLASS: 10 35 | GRAY_CONCRETE: 10 36 | INFESTED_MOSSY_STONE_BRICKS: 10 37 | BONE_BLOCK: 1 38 | DEAD_BRAIN_CORAL_BLOCK: 10 39 | MOSSY_COBBLESTONE: 10 40 | mobs: 41 | CAVE_SPIDER: 50 42 | STRAY: 50 43 | PILLAGER: 5 44 | SKELETON: 25 45 | VEX: 5 46 | ILLUSIONER: 5 47 | RAVAGER: 5 48 | CREEPER: 25 49 | ZOMBIE_HORSE: 5 50 | EVOKER: 5 51 | ENDERMITE: 10 52 | WITHER_SKELETON: 5 53 | -------------------------------------------------------------------------------- /src/main/resources/plugin.yml: -------------------------------------------------------------------------------- 1 | name: BentoBox-AOneBlock 2 | main: world.bentobox.aoneblock.AOneBlockPladdon 3 | version: ${project.version}${build.number} 4 | api-version: "1.21" 5 | 6 | authors: [tastybento] 7 | contributors: ["The BentoBoxWorld Community"] 8 | website: https://bentobox.world 9 | description: ${project.description} 10 | -------------------------------------------------------------------------------- /src/test/java/world/bentobox/aoneblock/dataobjects/OneBlockIslandsTest.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.dataobjects; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | import static org.junit.Assert.assertNotNull; 5 | import static org.junit.Assert.assertNull; 6 | import static org.junit.Assert.assertTrue; 7 | 8 | import java.util.List; 9 | import java.util.Queue; 10 | import java.util.UUID; 11 | 12 | import org.bukkit.entity.EntityType; 13 | import org.junit.After; 14 | import org.junit.Before; 15 | import org.junit.Test; 16 | import org.junit.runner.RunWith; 17 | import org.powermock.modules.junit4.PowerMockRunner; 18 | 19 | import world.bentobox.aoneblock.oneblocks.OneBlockObject; 20 | 21 | /** 22 | * @author tastybento 23 | * 24 | */ 25 | @RunWith(PowerMockRunner.class) 26 | public class OneBlockIslandsTest { 27 | 28 | private OneBlockIslands obi; 29 | private String id; 30 | 31 | /** 32 | * @throws java.lang.Exception 33 | */ 34 | @Before 35 | public void setUp() throws Exception { 36 | id = UUID.randomUUID().toString(); 37 | obi = new OneBlockIslands(id); 38 | } 39 | 40 | /** 41 | * @throws java.lang.Exception 42 | */ 43 | @After 44 | public void tearDown() throws Exception { 45 | } 46 | 47 | /** 48 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#getPhaseName()}. 49 | */ 50 | @Test 51 | public void testGetPhaseName() { 52 | assertEquals("", obi.getPhaseName()); 53 | } 54 | 55 | /** 56 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#setPhaseName(java.lang.String)}. 57 | */ 58 | @Test 59 | public void testSetPhaseName() { 60 | obi.setPhaseName("test"); 61 | assertEquals("test", obi.getPhaseName()); 62 | } 63 | 64 | /** 65 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#OneBlockIslands(java.lang.String)}. 66 | */ 67 | @Test 68 | public void testOneBlockIslands() { 69 | assertNotNull(obi); 70 | } 71 | 72 | /** 73 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#getBlockNumber()}. 74 | */ 75 | @Test 76 | public void testGetBlockNumber() { 77 | assertEquals(0, obi.getBlockNumber()); 78 | } 79 | 80 | /** 81 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#setBlockNumber(int)}. 82 | */ 83 | @Test 84 | public void testSetBlockNumber() { 85 | obi.setBlockNumber(1234); 86 | assertEquals(1234, obi.getBlockNumber()); 87 | } 88 | 89 | /** 90 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#incrementBlockNumber()}. 91 | */ 92 | @Test 93 | public void testIncrementBlockNumber() { 94 | obi.incrementBlockNumber(); 95 | assertEquals(1, obi.getBlockNumber()); 96 | } 97 | 98 | /** 99 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#getHologram()}. 100 | */ 101 | @Test 102 | public void testGetHologram() { 103 | assertEquals("", obi.getHologram()); 104 | } 105 | 106 | /** 107 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#setHologram(java.lang.String)}. 108 | */ 109 | @Test 110 | public void testSetHologram() { 111 | obi.setHologram("test"); 112 | assertEquals("test",obi.getHologram()); 113 | } 114 | 115 | /** 116 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#getUniqueId()}. 117 | */ 118 | @Test 119 | public void testGetUniqueId() { 120 | assertEquals(id, obi.getUniqueId()); 121 | } 122 | 123 | /** 124 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#setUniqueId(java.lang.String)}. 125 | */ 126 | @Test 127 | public void testSetUniqueId() { 128 | String t = UUID.randomUUID().toString(); 129 | obi.setUniqueId(t); 130 | assertEquals(t, obi.getUniqueId()); 131 | } 132 | 133 | /** 134 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#getQueue()}. 135 | */ 136 | @Test 137 | public void testGetQueue() { 138 | Queue q = obi.getQueue(); 139 | assertTrue(q.isEmpty()); 140 | } 141 | 142 | /** 143 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#getNearestMob(int)}. 144 | */ 145 | @Test 146 | public void testGetNearestMob() { 147 | List l = obi.getNearestMob(10); 148 | assertTrue(l.isEmpty()); 149 | } 150 | 151 | /** 152 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#add(world.bentobox.aoneblock.oneblocks.OneBlockObject)}. 153 | */ 154 | @Test 155 | public void testAdd() { 156 | OneBlockObject obo = new OneBlockObject(EntityType.ALLAY, 50); 157 | obi.add(obo); 158 | Queue q = obi.getQueue(); 159 | OneBlockObject ob = q.poll(); 160 | assertEquals(obo, ob); 161 | } 162 | 163 | /** 164 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#pollAndAdd(world.bentobox.aoneblock.oneblocks.OneBlockObject)}. 165 | */ 166 | @Test 167 | public void testPollAndAdd() { 168 | OneBlockObject obo = new OneBlockObject(EntityType.ALLAY, 50); 169 | OneBlockObject ob = obi.pollAndAdd(obo); 170 | assertNull(ob); 171 | ob = obi.getQueue().poll(); 172 | assertEquals(obo, ob); 173 | 174 | } 175 | 176 | /** 177 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#clearQueue()}. 178 | */ 179 | @Test 180 | public void testClearQueue() { 181 | OneBlockObject obo = new OneBlockObject(EntityType.ALLAY, 50); 182 | obi.add(obo); 183 | assertEquals(1, obi.getQueue().size()); 184 | obi.clearQueue(); 185 | assertEquals(0, obi.getQueue().size()); 186 | } 187 | 188 | /** 189 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#getLifetime()}. 190 | */ 191 | @Test 192 | public void testGetLifetime() { 193 | assertEquals(0L, obi.getLifetime()); 194 | } 195 | 196 | /** 197 | * Test method for {@link world.bentobox.aoneblock.dataobjects.OneBlockIslands#setLifetime(long)}. 198 | */ 199 | @Test 200 | public void testSetLifetime() { 201 | obi.setLifetime(123456789L); 202 | assertEquals(123456789L, obi.getLifetime()); 203 | } 204 | 205 | } 206 | -------------------------------------------------------------------------------- /src/test/java/world/bentobox/aoneblock/listeners/JoinLeaveListenerTest.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.listeners; 2 | 3 | import static org.junit.Assert.assertNotNull; 4 | import static org.mockito.ArgumentMatchers.any; 5 | import static org.mockito.ArgumentMatchers.anyString; 6 | import static org.mockito.Mockito.never; 7 | import static org.mockito.Mockito.verify; 8 | import static org.mockito.Mockito.when; 9 | 10 | import java.util.UUID; 11 | import java.util.concurrent.CompletableFuture; 12 | 13 | import org.bukkit.Location; 14 | import org.bukkit.World; 15 | import org.bukkit.entity.Player; 16 | import org.bukkit.event.player.PlayerQuitEvent; 17 | import org.bukkit.util.Vector; 18 | import org.junit.After; 19 | import org.junit.Before; 20 | import org.junit.Test; 21 | import org.junit.runner.RunWith; 22 | import org.mockito.Mock; 23 | import org.powermock.modules.junit4.PowerMockRunner; 24 | 25 | import world.bentobox.aoneblock.AOneBlock; 26 | import world.bentobox.bentobox.database.objects.Island; 27 | import world.bentobox.bentobox.managers.IslandsManager; 28 | 29 | /** 30 | * @author tastybento 31 | */ 32 | @RunWith(PowerMockRunner.class) 33 | public class JoinLeaveListenerTest { 34 | 35 | @Mock 36 | private AOneBlock aob; 37 | @Mock 38 | private Player p; 39 | 40 | private JoinLeaveListener jll; 41 | @Mock 42 | private BlockListener bl; 43 | @Mock 44 | private Location location; 45 | @Mock 46 | private IslandsManager im; 47 | @Mock 48 | private Island island; 49 | @Mock 50 | private World world; 51 | 52 | private static final UUID ID = UUID.randomUUID(); 53 | private static final Vector VECTOR = new Vector(123,120,456); 54 | /** 55 | * @throws java.lang.Exception 56 | */ 57 | @Before 58 | public void setUp() throws Exception { 59 | 60 | when(aob.getOverWorld()).thenReturn(world); 61 | // Player 62 | when(p.getUniqueId()).thenReturn(ID); 63 | 64 | // Island 65 | when(island.getCenter()).thenReturn(location); 66 | when(location.toVector()).thenReturn(VECTOR); 67 | 68 | // Island Manager 69 | when(aob.getIslands()).thenReturn(im); 70 | when(island.getCenter()).thenReturn(location); 71 | when(im.getIsland(world, ID)).thenReturn(island); 72 | 73 | // Save is successful 74 | when(bl.saveIsland(any())).thenReturn(CompletableFuture.completedFuture(Boolean.TRUE)); 75 | when(aob.getBlockListener()).thenReturn(bl); 76 | jll = new JoinLeaveListener(aob); 77 | 78 | } 79 | 80 | /** 81 | * @throws java.lang.Exception 82 | */ 83 | @After 84 | public void tearDown() throws Exception { 85 | } 86 | 87 | /** 88 | * Test method for {@link world.bentobox.aoneblock.listeners.JoinLeaveListener#JoinLeaveListener(world.bentobox.aoneblock.AOneBlock)}. 89 | */ 90 | @Test 91 | public void testJoinLeaveListener() { 92 | assertNotNull(jll); 93 | } 94 | 95 | /** 96 | * Test method for {@link world.bentobox.aoneblock.listeners.JoinLeaveListener#onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent)}. 97 | */ 98 | @Test 99 | public void testOnPlayerQuit() { 100 | PlayerQuitEvent event = new PlayerQuitEvent(p, "nothing"); 101 | jll.onPlayerQuit(event); 102 | verify(aob,never()).logError(anyString()); 103 | verify(bl).saveIsland(island); 104 | } 105 | 106 | /** 107 | * Test method for {@link world.bentobox.aoneblock.listeners.JoinLeaveListener#onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent)}. 108 | */ 109 | @Test 110 | public void testOnPlayerQuitNoIsland() { 111 | when(im.getIsland(world, ID)).thenReturn(null); 112 | PlayerQuitEvent event = new PlayerQuitEvent(p, "nothing"); 113 | jll.onPlayerQuit(event); 114 | verify(aob,never()).logError(anyString()); 115 | verify(bl, never()).saveIsland(island); 116 | } 117 | 118 | /** 119 | * Test method for {@link world.bentobox.aoneblock.listeners.JoinLeaveListener#onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent)}. 120 | */ 121 | @Test 122 | public void testOnPlayerQuitSaveError() { 123 | when(bl.saveIsland(any())).thenReturn(CompletableFuture.completedFuture(Boolean.FALSE)); 124 | PlayerQuitEvent event = new PlayerQuitEvent(p, "nothing"); 125 | jll.onPlayerQuit(event); 126 | verify(aob).logError(anyString()); 127 | verify(bl).saveIsland(island); 128 | verify(aob).logError("Could not save AOneBlock island at 123,120,456 to database null"); 129 | } 130 | 131 | } 132 | -------------------------------------------------------------------------------- /src/test/java/world/bentobox/aoneblock/listeners/NoBlockHandlerTest.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.listeners; 2 | 3 | import static org.junit.Assert.assertNotNull; 4 | import static org.mockito.ArgumentMatchers.any; 5 | import static org.mockito.Mockito.never; 6 | import static org.mockito.Mockito.verify; 7 | import static org.mockito.Mockito.when; 8 | 9 | import java.util.UUID; 10 | 11 | import org.bukkit.Location; 12 | import org.bukkit.Material; 13 | import org.bukkit.World; 14 | import org.bukkit.block.Block; 15 | import org.bukkit.entity.Player; 16 | import org.bukkit.event.player.PlayerRespawnEvent; 17 | import org.bukkit.event.player.PlayerRespawnEvent.RespawnReason; 18 | import org.junit.After; 19 | import org.junit.Before; 20 | import org.junit.Test; 21 | import org.junit.runner.RunWith; 22 | import org.mockito.Mock; 23 | import org.powermock.modules.junit4.PowerMockRunner; 24 | 25 | import world.bentobox.aoneblock.AOneBlock; 26 | import world.bentobox.bentobox.database.objects.Island; 27 | import world.bentobox.bentobox.managers.IslandsManager; 28 | 29 | /** 30 | * @author tastybento 31 | * 32 | */ 33 | @RunWith(PowerMockRunner.class) 34 | public class NoBlockHandlerTest { 35 | 36 | private static final UUID ID = UUID.randomUUID(); 37 | 38 | @Mock 39 | private AOneBlock aob; 40 | @Mock 41 | private Player p; 42 | 43 | private NoBlockHandler nbh; 44 | 45 | @Mock 46 | private Block block; 47 | @Mock 48 | private BlockListener bl; 49 | @Mock 50 | private Location location; 51 | @Mock 52 | private IslandsManager im; 53 | @Mock 54 | private Island island; 55 | @Mock 56 | private World world; 57 | 58 | /** 59 | * @throws java.lang.Exception 60 | */ 61 | @Before 62 | public void setUp() throws Exception { 63 | // Player 64 | when(p.getUniqueId()).thenReturn(ID); 65 | 66 | // In world 67 | when(aob.inWorld(world)).thenReturn(true); 68 | 69 | // Location 70 | when(location.getWorld()).thenReturn(world); 71 | 72 | // Block 73 | when(location.getBlock()).thenReturn(block); 74 | when(block.isEmpty()).thenReturn(false); 75 | 76 | // Island 77 | when(island.getCenter()).thenReturn(location); 78 | 79 | // Island Manager 80 | when(aob.getIslands()).thenReturn(im); 81 | when(island.getCenter()).thenReturn(location); 82 | when(im.getIsland(world, ID)).thenReturn(island); 83 | 84 | nbh = new NoBlockHandler(aob); 85 | } 86 | 87 | /** 88 | * @throws java.lang.Exception 89 | */ 90 | @After 91 | public void tearDown() throws Exception { 92 | } 93 | 94 | /** 95 | * Test method for 96 | * {@link world.bentobox.aoneblock.listeners.NoBlockHandler#NoBlockHandler(world.bentobox.aoneblock.AOneBlock)}. 97 | */ 98 | @Test 99 | public void testNoBlockHandler() { 100 | assertNotNull(nbh); 101 | } 102 | 103 | /** 104 | * Test method for 105 | * {@link world.bentobox.aoneblock.listeners.NoBlockHandler#onRespawn(org.bukkit.event.player.PlayerRespawnEvent)}. 106 | */ 107 | @Test 108 | public void testOnRespawnSolidBlock() { 109 | PlayerRespawnEvent event = new PlayerRespawnEvent(p, location, false, false, RespawnReason.DEATH); 110 | nbh.onRespawn(event); 111 | verify(block, never()).setType(any(Material.class)); 112 | 113 | } 114 | 115 | /** 116 | * Test method for {@link world.bentobox.aoneblock.listeners.NoBlockHandler#onRespawn(org.bukkit.event.player.PlayerRespawnEvent)}. 117 | */ 118 | @Test 119 | public void testOnRespawnAirBlock() { 120 | when(block.isEmpty()).thenReturn(true); 121 | PlayerRespawnEvent event = new PlayerRespawnEvent(p, location, false, false, RespawnReason.DEATH); 122 | nbh.onRespawn(event); 123 | verify(block).setType(any(Material.class)); 124 | 125 | } 126 | 127 | /** 128 | * Test method for {@link world.bentobox.aoneblock.listeners.NoBlockHandler#onRespawn(org.bukkit.event.player.PlayerRespawnEvent)}. 129 | */ 130 | @Test 131 | public void testOnRespawnAirBlockWrongWorld() { 132 | when(aob.inWorld(world)).thenReturn(false); 133 | when(block.isEmpty()).thenReturn(true); 134 | PlayerRespawnEvent event = new PlayerRespawnEvent(p, location, false, false, RespawnReason.DEATH); 135 | nbh.onRespawn(event); 136 | verify(block, never()).setType(any(Material.class)); 137 | 138 | } 139 | 140 | /** 141 | * Test method for {@link world.bentobox.aoneblock.listeners.NoBlockHandler#onRespawn(org.bukkit.event.player.PlayerRespawnEvent)}. 142 | */ 143 | @Test 144 | public void testOnRespawnAirBlockNoIsland() { 145 | when(im.getIsland(world, ID)).thenReturn(null); 146 | when(block.isEmpty()).thenReturn(true); 147 | PlayerRespawnEvent event = new PlayerRespawnEvent(p, location, false, false, RespawnReason.DEATH); 148 | nbh.onRespawn(event); 149 | verify(block, never()).setType(any(Material.class)); 150 | 151 | } 152 | 153 | } 154 | -------------------------------------------------------------------------------- /src/test/java/world/bentobox/aoneblock/mocks/ServerMocks.java: -------------------------------------------------------------------------------- 1 | package world.bentobox.aoneblock.mocks; 2 | 3 | import static org.mockito.ArgumentMatchers.notNull; 4 | import static org.mockito.Mockito.doAnswer; 5 | import static org.mockito.Mockito.doReturn; 6 | import static org.mockito.Mockito.mock; 7 | import static org.mockito.Mockito.when; 8 | 9 | import java.lang.reflect.Field; 10 | import java.util.HashMap; 11 | import java.util.Locale; 12 | import java.util.Map; 13 | import java.util.Set; 14 | import java.util.logging.Logger; 15 | 16 | import org.bukkit.Bukkit; 17 | import org.bukkit.Keyed; 18 | import org.bukkit.NamespacedKey; 19 | import org.bukkit.Registry; 20 | import org.bukkit.Server; 21 | import org.bukkit.Tag; 22 | import org.bukkit.UnsafeValues; 23 | import org.eclipse.jdt.annotation.NonNull; 24 | 25 | public final class ServerMocks { 26 | 27 | public static @NonNull Server newServer() { 28 | Server mock = mock(Server.class); 29 | 30 | Logger noOp = mock(Logger.class); 31 | when(mock.getLogger()).thenReturn(noOp); 32 | when(mock.isPrimaryThread()).thenReturn(true); 33 | 34 | // Unsafe 35 | UnsafeValues unsafe = mock(UnsafeValues.class); 36 | when(mock.getUnsafe()).thenReturn(unsafe); 37 | 38 | // Server must be available before tags can be mocked. 39 | Bukkit.setServer(mock); 40 | 41 | // Bukkit has a lot of static constants referencing registry values. To initialize those, the 42 | // registries must be able to be fetched before the classes are touched. 43 | Map, Object> registers = new HashMap<>(); 44 | 45 | doAnswer(invocationGetRegistry -> registers.computeIfAbsent(invocationGetRegistry.getArgument(0), clazz -> { 46 | Registry registry = mock(Registry.class); 47 | Map cache = new HashMap<>(); 48 | doAnswer(invocationGetEntry -> { 49 | NamespacedKey key = invocationGetEntry.getArgument(0); 50 | // Some classes (like BlockType and ItemType) have extra generics that will be 51 | // erased during runtime calls. To ensure accurate typing, grab the constant's field. 52 | // This approach also allows us to return null for unsupported keys. 53 | Class constantClazz; 54 | try { 55 | //noinspection unchecked 56 | constantClazz = (Class) clazz 57 | .getField(key.getKey().toUpperCase(Locale.ROOT).replace('.', '_')).getType(); 58 | } catch (ClassCastException e) { 59 | throw new RuntimeException(e); 60 | } catch (NoSuchFieldException e) { 61 | return null; 62 | } 63 | 64 | return cache.computeIfAbsent(key, key1 -> { 65 | Keyed keyed = mock(constantClazz); 66 | doReturn(key).when(keyed).getKey(); 67 | return keyed; 68 | }); 69 | }).when(registry).get(notNull()); 70 | return registry; 71 | })).when(mock).getRegistry(notNull()); 72 | 73 | // Tags are dependent on registries, but use a different method. 74 | // This will set up blank tags for each constant; all that needs to be done to render them 75 | // functional is to re-mock Tag#getValues. 76 | doAnswer(invocationGetTag -> { 77 | Tag tag = mock(Tag.class); 78 | doReturn(invocationGetTag.getArgument(1)).when(tag).getKey(); 79 | doReturn(Set.of()).when(tag).getValues(); 80 | doAnswer(invocationIsTagged -> { 81 | Keyed keyed = invocationIsTagged.getArgument(0); 82 | Class type = invocationGetTag.getArgument(2); 83 | if (!type.isAssignableFrom(keyed.getClass())) { 84 | return null; 85 | } 86 | // Since these are mocks, the exact instance might not be equal. Consider equal keys equal. 87 | return tag.getValues().contains(keyed) 88 | || tag.getValues().stream().anyMatch(value -> value.getKey().equals(keyed.getKey())); 89 | }).when(tag).isTagged(notNull()); 90 | return tag; 91 | }).when(mock).getTag(notNull(), notNull(), notNull()); 92 | 93 | // Once the server is all set up, touch BlockType and ItemType to initialize. 94 | // This prevents issues when trying to access dependent methods from a Material constant. 95 | try { 96 | Class.forName("org.bukkit.inventory.ItemType"); 97 | Class.forName("org.bukkit.block.BlockType"); 98 | } catch (ClassNotFoundException e) { 99 | throw new RuntimeException(e); 100 | } 101 | 102 | return mock; 103 | } 104 | 105 | public static void unsetBukkitServer() { 106 | try { 107 | Field server = Bukkit.class.getDeclaredField("server"); 108 | server.setAccessible(true); 109 | server.set(null, null); 110 | } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) { 111 | throw new RuntimeException(e); 112 | } 113 | } 114 | 115 | private ServerMocks() { 116 | } 117 | 118 | } --------------------------------------------------------------------------------