summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-09-09 01:17:53 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-09-09 01:19:23 +0100
commitf36bca9fb715c20c3658920eba173cf3827d60cb (patch)
treeaa70d52f5fcd745a16c6159a24da7b9474f541e4 /src/main/java/org
parent59babb2c31b9ffb6b94e5072559e18f853d19b23 (diff)
downloadcraftbukkit-f36bca9fb715c20c3658920eba173cf3827d60cb.tar
craftbukkit-f36bca9fb715c20c3658920eba173cf3827d60cb.tar.gz
craftbukkit-f36bca9fb715c20c3658920eba173cf3827d60cb.tar.lz
craftbukkit-f36bca9fb715c20c3658920eba173cf3827d60cb.tar.xz
craftbukkit-f36bca9fb715c20c3658920eba173cf3827d60cb.zip
Implemented new GameMode methods (hint: You can't set game mode yet. Sorry.)
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java10
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java9
2 files changed, 18 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 038afed5..5ce5204f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -769,7 +769,7 @@ public final class CraftServer implements Server {
}
public OfflinePlayer getOfflinePlayer(String name) {
- OfflinePlayer result = getPlayer(name);
+ OfflinePlayer result = getPlayerExact(name);
if (result == null) {
result = new CraftOfflinePlayer(this, name);
@@ -819,4 +819,12 @@ public final class CraftServer implements Server {
public void reloadWhitelist() {
server.f();
}
+
+ public GameMode getDefaultGameMode() {
+ return GameMode.SURVIVAL;
+ }
+
+ public void setDefaultGameMode(GameMode mode) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index c605cca8..9a37697b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -3,6 +3,7 @@ package org.bukkit.craftbukkit.entity;
import java.util.Set;
import net.minecraft.server.EntityHuman;
+import org.bukkit.GameMode;
import org.bukkit.entity.HumanEntity;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
@@ -116,4 +117,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
public Set<PermissionAttachmentInfo> getEffectivePermissions() {
return perm.getEffectivePermissions();
}
+
+ public GameMode getGameMode() {
+ return GameMode.SURVIVAL;
+ }
+
+ public void setGameMode(GameMode mode) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}