This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.qwertyy.nonetherroof; | |
| import java.util.LinkedList; | |
| import org.bukkit.ChatColor; | |
| import org.bukkit.Location; | |
| import org.bukkit.Server; | |
| import org.bukkit.entity.Player; | |
| import org.bukkit.event.player.PlayerCommandPreprocessEvent; | |
| import org.bukkit.event.player.PlayerMoveEvent; | |
| import org.bukkit.inventory.ItemStack; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: NoNetherRoof | |
| version: 1.0 | |
| main: com.qwertyy.nonetherroof.NoNetherRoofPlayerListener | |
| commands: | |
| stuck: | |
| description: Teleports player below Nether roof | |
| usage: /stuck | |
| permissions: | |
| nonetherroof.use: | |
| description: Allows use of /stuck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.names.add("cbcobo"); // popbob | |
| this.names.add("cbyvprzvxr55"); // policemike55 | |
| this.names.add("cnffvr05"); // passie05 | |
| this.names.add("kpp2"); // xcc2 | |
| this.names.add("pernzbsgurfybc"); // creamofthecrop | |
| this.names.add("nffnffva_encgbe"); // assassin_parrot | |
| this.names.add("jrgcynlre123"); // wetplayer123 | |
| this.names.add("cbyyl_gur_cneebg"); // polly_the_parrot | |
| this.names.add("k0kc"); // x0xp | |
| this.names.add("KkCE3Q4GBEkK86"); // ROT13 case study |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private String rot13(String input) { | |
| StringBuilder result = new StringBuilder(); | |
| for (char c : input.toCharArray()) { | |
| if (c >= 'a' && c <= 'z') { | |
| result.append((char) ((c - 'a' + 13) % 26 + 'a')); | |
| } else if (c >= 'A' && c <= 'Z') { | |
| result.append((char) ((c - 'A' + 13) % 26 + 'A')); | |
| } else { | |
| result.append(c); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (cmd.equalsIgnoreCase("/stuck")) { | |
| Location loc = player.getLocation(); | |
| World world = player.getWorld(); | |
| if (world.getEnvironment().equals(World.Environment.NETHER)) { | |
| int y = loc.getBlockY(); | |
| while (y > 0 && world.getBlockAt(loc.getBlockX(), y, loc.getBlockZ()).getType() != Material.AIR) { | |
| y--; | |
| } | |
| if (y > 0) { | |
| Location newLoc = new Location(world, loc.getX(), y + 1, loc.getZ()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.LinkedList; | |
| import org.bukkit.ChatColor; | |
| import org.bukkit.Location; | |
| import org.bukkit.Server; | |
| import org.bukkit.entity.Player; | |
| import org.bukkit.event.player.PlayerCommandPreprocessEvent; | |
| import org.bukkit.event.player.PlayerMoveEvent; | |
| import org.bukkit.inventory.ItemStack; | |
| import org.bukkit.plugin.java.JavaPlugin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.qwertyy.nonetherroof; |