summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2012-01-12 19:43:34 +0100
committerErik Broes <erikbroes@grum.nl>2012-01-12 19:43:34 +0100
commit7d0e739f96d51197e8f7dd5acd7b950b2f598670 (patch)
tree0b2332a04109adc25091cf92fbe9531a0872edfd /src/main/java
parent897551e39e0e24812acc0704e963d347dfa4a8ef (diff)
downloadcraftbukkit-7d0e739f96d51197e8f7dd5acd7b950b2f598670.tar
craftbukkit-7d0e739f96d51197e8f7dd5acd7b950b2f598670.tar.gz
craftbukkit-7d0e739f96d51197e8f7dd5acd7b950b2f598670.tar.lz
craftbukkit-7d0e739f96d51197e8f7dd5acd7b950b2f598670.tar.xz
craftbukkit-7d0e739f96d51197e8f7dd5acd7b950b2f598670.zip
Fix balance of CraftBukkit start/end.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/ConsoleLogManager.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityFireball.java3
-rw-r--r--src/main/java/net/minecraft/server/EntityMinecart.java4
-rw-r--r--src/main/java/net/minecraft/server/EntityPlayer.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityWolf.java2
-rw-r--r--src/main/java/net/minecraft/server/ItemStack.java2
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java4
-rw-r--r--src/main/java/net/minecraft/server/ServerConfigurationManager.java3
-rw-r--r--src/main/java/net/minecraft/server/World.java2
9 files changed, 11 insertions, 13 deletions
diff --git a/src/main/java/net/minecraft/server/ConsoleLogManager.java b/src/main/java/net/minecraft/server/ConsoleLogManager.java
index 806df662..6a03e90a 100644
--- a/src/main/java/net/minecraft/server/ConsoleLogManager.java
+++ b/src/main/java/net/minecraft/server/ConsoleLogManager.java
@@ -43,7 +43,7 @@ public class ConsoleLogManager {
int count = ((Integer)server.options.valueOf("log-count")).intValue();
boolean append = ((Boolean)server.options.valueOf("log-append")).booleanValue();
FileHandler filehandler = new FileHandler(pattern, limit, count, append);
- // CraftBukkit start
+ // CraftBukkit end
filehandler.setFormatter(consolelogformatter);
a.addHandler(filehandler);
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
index 667bf221..3e44ace4 100644
--- a/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
@@ -46,7 +46,7 @@ public class EntityFireball extends Entity {
this.setPosition(this.locX, this.locY, this.locZ);
this.height = 0.0F;
this.motX = this.motY = this.motZ = 0.0D;
- // CraftBukkit start (added setDirection method)
+ // CraftBukkit start - (added setDirection method)
this.setDirection(d0, d1, d2);
}
@@ -60,6 +60,7 @@ public class EntityFireball extends Entity {
this.dirY = d1 / d3 * 0.1D;
this.dirZ = d2 / d3 * 0.1D;
}
+ // CraftBukkit end
public void w_() {
super.w_();
diff --git a/src/main/java/net/minecraft/server/EntityMinecart.java b/src/main/java/net/minecraft/server/EntityMinecart.java
index 951b972d..98f7dae8 100644
--- a/src/main/java/net/minecraft/server/EntityMinecart.java
+++ b/src/main/java/net/minecraft/server/EntityMinecart.java
@@ -513,7 +513,7 @@ public class EntityMinecart extends Entity implements IInventory {
this.motX *= this.derailedX;
this.motY *= this.derailedY;
this.motZ *= this.derailedZ;
- // CraftBukkit start
+ // CraftBukkit end
}
this.move(this.motX, this.motY, this.motZ);
@@ -522,7 +522,7 @@ public class EntityMinecart extends Entity implements IInventory {
this.motX *= this.flyingX;
this.motY *= this.flyingY;
this.motZ *= this.flyingZ;
- // CraftBukkit start
+ // CraftBukkit end
}
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 94d2facf..e01b529c 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -173,7 +173,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.b.serverConfigurationManager.sendAll(new Packet3Chat(event.getDeathMessage()));
}
- // CraftBukkit - we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
+ // CraftBukkit start - we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
for (int i = 0; i < this.inventory.items.length; ++i) {
this.inventory.items[i] = null;
}
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
index c0ead7dd..ad91308c 100644
--- a/src/main/java/net/minecraft/server/EntityWolf.java
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
@@ -364,7 +364,7 @@ public class EntityWolf extends EntityAnimal {
}
if (!this.world.isStatic) {
- // CraftBukkit - added event call and isCancelled check.
+ // CraftBukkit start - added event call and isCancelled check.
if (this.random.nextInt(3) == 0 && !CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) {
// CraftBukkit end
this.setTamed(true);
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index fe59b988..1209c884 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -39,7 +39,7 @@ public final class ItemStack {
this.setData(k); // CraftBukkit
}
- // CraftBukkit - used to create a new ItemStack, specifying the enchantments at time of creation.
+ // CraftBukkit start - used to create a new ItemStack, specifying the enchantments at time of creation.
public ItemStack(int id, int count, int data, NBTTagList enchantments) {
this(id, count, data);
// taken from .addEnchantment
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e37b56de..a2831995 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -206,7 +206,6 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
j = WorldSettings.a(j);
log.info("Default game type: " + j);
-
// CraftBukkit start (+ removed worldsettings and servernbtmanager)
int worldCount = 3;
@@ -223,13 +222,12 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
}
if (k == 2) {
- // CraftBukkit start (+ don't do this in server.properties, do it in bukkit.yml)
+ // CraftBukkit - (+ don't do this in server.properties, do it in bukkit.yml)
if (this.server.getAllowEnd()) {
dimension = 1;
} else {
continue;
}
- // CraftBukkit end
}
String worldType = Environment.getEnvironment(dimension).toString().toLowerCase();
diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
index 0213adc8..0673c19b 100644
--- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java
+++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
@@ -111,7 +111,7 @@ public class ServerConfigurationManager {
}
public void c(EntityPlayer entityplayer) {
- // CraftBukkit
+ // CraftBukkit start
cserver.detectListNameConflict(entityplayer);
this.sendAll(new Packet201PlayerInfo(entityplayer.listName, true, 1000));
// CraftBukkit end
@@ -223,6 +223,7 @@ public class ServerConfigurationManager {
}
public EntityPlayer moveToWorld(EntityPlayer entityplayer, int i, boolean flag, Location location) {
+ // CraftBukkit end
this.server.getTracker(entityplayer.dimension).untrackPlayer(entityplayer);
// this.server.getTracker(entityplayer.dimension).untrackEntity(entityplayer); // CraftBukkit
this.getPlayerManager(entityplayer.dimension).removePlayer(entityplayer);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f45457ad..e3f1573a 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2421,11 +2421,9 @@ public class World implements IBlockAccess {
Entity entity = null;
for (int i = 0; i < list.size(); ++i) {
entity = (Entity) list.get(i);
- // CraftBukkit start - fixed an NPE
if (entity == null) {
continue;
}
- // CraftBukkit end
this.entityList.add(entity);
// CraftBukkit end
this.c((Entity) list.get(i));