diff options
author | snowleo <schneeleo@gmail.com> | 2011-09-17 13:14:34 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-09-17 13:14:34 +0200 |
commit | 002e4a27729f365c093f2efef80cfc02f8e5d0a2 (patch) | |
tree | 9f6885715aeea89872b8575ec326fe623dafb854 | |
parent | 0e9b97128043fab09880e09262b2c9778e31e722 (diff) | |
download | Essentials-002e4a27729f365c093f2efef80cfc02f8e5d0a2.tar Essentials-002e4a27729f365c093f2efef80cfc02f8e5d0a2.tar.gz Essentials-002e4a27729f365c093f2efef80cfc02f8e5d0a2.tar.lz Essentials-002e4a27729f365c093f2efef80cfc02f8e5d0a2.tar.xz Essentials-002e4a27729f365c093f2efef80cfc02f8e5d0a2.zip |
New methods in player and server interface.
3 files changed, 182 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java index 46a2648a2..0d019848e 100644 --- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java +++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java @@ -7,6 +7,7 @@ import java.util.Set; import java.util.UUID; import org.bukkit.Achievement; import org.bukkit.Effect; +import org.bukkit.GameMode; import org.bukkit.Instrument; import org.bukkit.Location; import org.bukkit.Material; @@ -610,4 +611,88 @@ public class OfflinePlayer implements Player { base.setWhitelisted(bln); } + + @Override + public GameMode getGameMode() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setGameMode(GameMode gm) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getExperience() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setExperience(int i) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getLevel() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setLevel(int i) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getTotalExperience() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setTotalExperience(int i) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getExhaustion() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setExhaustion(float f) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public float getSaturation() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setSaturation(float f) + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int getFoodLevel() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setFoodLevel(int i) + { + throw new UnsupportedOperationException("Not supported yet."); + } } diff --git a/Essentials/src/com/earth2me/essentials/PlayerWrapper.java b/Essentials/src/com/earth2me/essentials/PlayerWrapper.java index 0f65970e7..6fde72e71 100644 --- a/Essentials/src/com/earth2me/essentials/PlayerWrapper.java +++ b/Essentials/src/com/earth2me/essentials/PlayerWrapper.java @@ -641,4 +641,88 @@ public class PlayerWrapper implements Player { base.setWhitelisted(bln); } + + @Override + public GameMode getGameMode() + { + return base.getGameMode(); + } + + @Override + public void setGameMode(GameMode gm) + { + base.setGameMode(gm); + } + + @Override + public int getExperience() + { + return base.getExperience(); + } + + @Override + public void setExperience(int i) + { + base.setExperience(i); + } + + @Override + public int getLevel() + { + return base.getLevel(); + } + + @Override + public void setLevel(int i) + { + base.setLevel(i); + } + + @Override + public int getTotalExperience() + { + return base.getTotalExperience(); + } + + @Override + public void setTotalExperience(int i) + { + base.setTotalExperience(i); + } + + @Override + public float getExhaustion() + { + return base.getExhaustion(); + } + + @Override + public void setExhaustion(float f) + { + base.setExhaustion(f); + } + + @Override + public float getSaturation() + { + return base.getSaturation(); + } + + @Override + public void setSaturation(float f) + { + base.setSaturation(f); + } + + @Override + public int getFoodLevel() + { + return base.getFoodLevel(); + } + + @Override + public void setFoodLevel(int i) + { + base.setFoodLevel(i); + } } diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java index 5f1f3aa0b..ac5636c61 100644 --- a/Essentials/test/com/earth2me/essentials/FakeServer.java +++ b/Essentials/test/com/earth2me/essentials/FakeServer.java @@ -9,6 +9,7 @@ import java.util.UUID; import java.util.concurrent.Callable; import java.util.concurrent.Future; import java.util.logging.Logger; +import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Server; import org.bukkit.World; @@ -445,4 +446,16 @@ public class FakeServer implements Server { throw new UnsupportedOperationException("Not supported yet."); } + + @Override + public GameMode getDefaultGameMode() + { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDefaultGameMode(GameMode gm) + { + throw new UnsupportedOperationException("Not supported yet."); + } } |