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\Location.java
- +++ C:\Users\Jeremy\Desktop\MinecraftServer\src\Location.java
- @@ -25,6 +25,21 @@
- }
- /**
- + * Creates a location with the specified coordinates and dimension
- + *
- + * @param X
- + * @param Y
- + * @param Z
- + * @param enitiyDimension
- + */
- + public Location(double X, double Y, double Z, int entityDimension) {
- + x = X;
- + y = Y;
- + z = Z;
- + dimension = entityDimension;
- + }
- +
- + /**
- * Creates a location with the specified coordinates and rotation
- *
- * @param X
- @@ -42,6 +57,25 @@
- }
- /**
- + * Creates a location with the specified coordinates, rotation, and dimension
- + *
- + * @param X
- + * @param Y
- + * @param Z
- + * @param rotation
- + * @param pitch
- + * @param entityDimension
- + */
- + public Location(double X, double Y, double Z, float rotation, float pitch, int entityDimension) {
- + x = X;
- + y = Y;
- + z = Z;
- + rotX = rotation;
- + rotY = pitch;
- + dimension = entityDimension;
- + }
- +
- + /**
- * X location
- */
- public double x;
- @@ -61,4 +95,9 @@
- * Pitch
- */
- public float rotY;
- + /**
- + * Dimension (Int)
- + */
- + public int dimension;
- +
- }
- # This patch file was generated by NetBeans IDE
- # It uses platform neutral UTF-8 encoding and \n newlines.
- --- C:\Users\Jeremy\Dropbox\CanaryMod\src\Player.java
- +++ C:\Users\Jeremy\Desktop\MinecraftServer\src\Player.java
- @@ -332,9 +332,14 @@
- loc.z = getZ();
- loc.rotX = getRotation();
- loc.rotY = getPitch();
- + loc.dimension = getDimension();
- return loc;
- }
- + public int getDimension(){
- + return ((OEntityPlayerMP)entity).s;
- + }
- +
- /**
- * Returns the IP of this player
- *
- # 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,12 +244,18 @@
- return;
- Player player = etc.getServer().matchPlayer(split[1]);
- + OEntityPlayerMP player1 = etc.getMCServer().f.i(caller.getName());
- + OEntityPlayerMP player2 = etc.getMCServer().f.i(split[1]);
- if (player != null) {
- if (caller.getName().equalsIgnoreCase(player.getName())) {
- caller.notify("You're already here!");
- return;
- }
- + if (player1.s != player2.s){
- + caller.notify("The player you're trying to teleport is in another dimension.");
- + return;
- + }
- log.info(caller.getName() + " teleported to " + player.getName());
- ((Player) caller).teleportTo(player);
- @@ -665,6 +671,10 @@
- caller.notify("Could not find player.");
- return;
- }
- + if (toMove.getDimension() != etc.getServer().getSpawnLocation().dimension){
- + caller.notify("The spawn is in another dimension.");
- + return;
- + }
- toMove.teleportTo(etc.getServer().getSpawnLocation());
- @@ -714,6 +724,11 @@
- else
- home = etc.getDataSource().getHome(caller.getName());
- + if (home.Location.dimension != player.getDimension()){
- + caller.notify("That home is in another dimension.");
- + return;
- + }
- +
- if (home != null)
- player.teleportTo(home.Location);
- else if (split.length > 1 && player.isAdmin())
- @@ -749,6 +764,10 @@
- if ((caller instanceof Player) && !((Player) caller).isInGroup(warp.Group) && !warp.Group.equals(""))
- caller.notify("Warp not found.");
- else {
- + if (warp.Location.dimension != (toWarp.getDimension())){
- + caller.notify("That warp is in another dimension.");
- + return;
- + }
- toWarp.teleportTo(warp.Location);
- toWarp.sendMessage(Colors.Rose + "Woosh!");
- }
- # This patch file was generated by NetBeans IDE
- # It uses platform neutral UTF-8 encoding and \n newlines.
- --- C:\Users\Jeremy\Dropbox\CanaryMod\src\FlatFileSource.java
- +++ C:\Users\Jeremy\Desktop\MinecraftServer\src\FlatFileSource.java
- @@ -257,7 +257,7 @@
- String line = scanner.nextLine();
- if (line.startsWith("#") || line.equals(""))
- continue;
- - String[] split = line.split("[^\\\\]:");
- + String[] split = line.split("\\:");
- if (split.length < 4)
- continue;
Advertisement
Add Comment
Please, Sign In to add comment