Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This patch file was generated by NetBeans IDE
- # It uses platform neutral UTF-8 encoding and \n newlines.
- --- C:\Users\Jeremy\Dropbox\CanaryMod\src\PlayerCommands.java
- +++ C:\Users\Jeremy\Desktop\MinecraftServer\src\PlayerCommands.java
- @@ -244,7 +244,29 @@
- return;
- Player player = etc.getServer().matchPlayer(split[1]);
- + if (player.getWorld().getType() != ((Player) caller).getWorld().getType()){
- + if (((Player) caller).canIgnoreRestrictions()){
- + if (player != null){
- + if (caller.getName().equalsIgnoreCase(player.getName())){
- + caller.notify("You can't do that...");
- + return;
- + }
- + log.info(caller.getName() + " shifted worlds and teleported to " + player.getName());
- + caller.notify("You feel the world shifting...");
- + ((Player) caller).switchWorlds();
- + caller.notify("The worlds suddenly snap back.");
- + if (((Player) caller).getWorld().getType() != player.getWorld().getType()){
- + caller.notify("The veil between worlds is still too strong.");
- + return;
- + }
- + }
- + } else {
- +
- + caller.notify("That player is in another world.");
- + return;
- + }}
- +
- if (player != null) {
- if (caller.getName().equalsIgnoreCase(player.getName())) {
- caller.notify("You're already here!");
- @@ -266,7 +288,29 @@
- return;
- Player player = etc.getServer().matchPlayer(split[1]);
- + if (player.getWorld().getType() != ((Player) caller).getWorld().getType()){
- + if (((Player) caller).canIgnoreRestrictions()){
- + if (player != null){
- + if (caller.getName().equalsIgnoreCase(player.getName())){
- + caller.notify("You can't do that...");
- + return;
- + }
- + log.info(caller.getName() + " caused the worlds to shift around " + player.getName());
- + player.sendMessage("§4You feel the world shifting...");
- + player.switchWorlds();
- + if (player.getWorld().getType() != ((Player) caller).getWorld().getType()){
- + player.sendMessage("§4The veil between worlds keeps you in your place.");
- + return;
- + }
- + }
- + } else {
- +
- + caller.notify("That player is in another world.");
- + return;
- + }
- + }
- +
- if (player != null) {
- if (caller.getName().equalsIgnoreCase(player.getName())) {
- caller.notify("Wow look at that! You teleported yourself to yourself!");
- @@ -634,6 +678,10 @@
- caller.notify("Could not find player.");
- return;
- }
- + if ((player.getWorld().getType().getType()) != 0){
- + caller.notify("You cannot set a home in the Nether, mortal.");
- + return;
- + }
- Warp home = new Warp();
- home.Location = player.getLocation();
- @@ -665,6 +713,21 @@
- caller.notify("Could not find player.");
- return;
- }
- + if (toMove.getWorld().getType().getType() != 0){
- + if (toMove.canIgnoreRestrictions()){
- + toMove.sendMessage("§4You feel the worlds start to shift...");
- + int derp = toMove.getWorld().getType().getType();
- + toMove.switchWorlds();
- + toMove.sendMessage("§4The worlds suddenly snap back into focus.");
- + if (derp == toMove.getWorld().getType().getType()){
- + toMove.sendMessage("§4The veil is still too strong.");
- + return;
- + }
- + } else {
- + toMove.sendMessage("§4The veil between the worlds keeps you bound to the Nether...");
- + return;
- + }
- + }
- toMove.teleportTo(toMove.getWorld().getSpawnLocation());
- @@ -689,6 +752,11 @@
- return;
- }
- + if ((player.getWorld().getType().getType()) != 0){
- + caller.notify("You cannot set the spawn point in the Nether, mortal.");
- + return;
- + }
- +
- OWorldInfo info = player.getWorld().getWorld().x;
- info.a((int) player.getX(), (int) player.getY(), (int) player.getZ());
- @@ -714,13 +782,31 @@
- else
- home = etc.getDataSource().getHome(caller.getName());
- + if (player.getWorld().getType().getType() != 0){
- + if (player.canIgnoreRestrictions()){
- + player.sendMessage("§4You feel the worlds start to shift...");
- + int derp = player.getWorld().getType().getType();
- + player.switchWorlds();
- + player.sendMessage("§4The worlds suddenly come back into focus.");
- + if (derp == player.getWorld().getType().getType()){
- + player.sendMessage("§4The veil is still too strong.");
- + return;
- + }
- + } else {
- + player.sendMessage("§4The veil between the worlds keeps you in the Nether...");
- + return;
- + }
- + }
- +
- if (home != null)
- player.teleportTo(home.Location);
- else if (split.length > 1 && player.isAdmin())
- caller.notify("That player home does not exist");
- else
- player.teleportTo(player.getWorld().getSpawnLocation());
- +
- }
- +
- };
- @Command
- public static final BaseCommand warp = new BaseCommand("[Warp] - Warps to the specified warp.", "Correct usage is: /warp [warpname]", 2, 3) {
- @@ -749,6 +835,22 @@
- if ((caller instanceof Player) && !((Player) caller).isInGroup(warp.Group) && !warp.Group.equals(""))
- caller.notify("Warp not found.");
- else {
- + if (toWarp.getWorld().getType().getType() != 0){
- + if (toWarp.canIgnoreRestrictions()) {
- + toWarp.sendMessage("§4You feel the worlds start to shift...");
- + int derp = toWarp.getWorld().getType().getType();
- + toWarp.switchWorlds();
- + toWarp.sendMessage("§4The worlds suddenly snap back into focus...");
- + if (derp == toWarp.getWorld().getType().getType()){
- + toWarp.sendMessage("§4The veil is still too strong.");
- + return;
- + }
- + } else {
- + toWarp.sendMessage("§4The veil between the worlds keeps you in the Nether...");
- + return;
- + }
- + }
- +
- toWarp.teleportTo(warp.Location);
- toWarp.sendMessage(Colors.Rose + "Woosh!");
- }
- @@ -787,6 +889,11 @@
- caller.notify("You can't set a warp with \":\" in its name");
- return;
- }*/
- + if (((Player) caller).getWorld().getType().getType() != 0){
- + caller.notify("You cannot set a warp in the Nether, mortal.");
- + return;
- + }
- +
- Warp warp = new Warp();
- warp.Name = split[1];
- warp.Location = ((Player) caller).getLocation();
Advertisement
Add Comment
Please, Sign In to add comment