mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 19:46:21 +01:00
Implemented new GameMode methods (hint: You can't set game mode yet. Sorry.)
This commit is contained in:
parent
59babb2c31
commit
f36bca9fb7
@ -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.");
|
||||
}
|
||||
}
|
||||
|
@ -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.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user