public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); if (nbttagcompound.b("playerGameType")) { // XXX Check this, it was only the last call to this.c.a if (MinecraftServer.D().am()) { this.c.a(MinecraftServer.D().g()); } else { this.c.a(EnumGameType.a(nbttagcompound.e("playerGameType"))); } } }
public void changeWorld(WorldServer srv) { ChunkCoordinates chunkcoordinates = srv.l(); if (chunkcoordinates != null) { this.a.a( (double) chunkcoordinates.a, (double) chunkcoordinates.b, (double) chunkcoordinates.c, 0.0F, 0.0F, srv.getCanaryWorld().getType().getId(), srv.getCanaryWorld().getName()); } // CanaryMod: Dimension switch hook. Location goingTo = this.simulatePortalUse( srv.q, MinecraftServer.D().getWorld(this.getCanaryWorld().getName(), srv.q)); CancelableHook hook = new DimensionSwitch(this.getCanaryEntity(), this.getCanaryEntity().getLocation(), goingTo); Canary.hooks().callHook(hook); if (hook.isCanceled()) { return; } // this.b.ad().a(this, srv.getCanaryWorld().getName(), srv.getCanaryWorld().getType().getId()); this.cp = -1; this.cm = -1; this.cn = -1; }
public void a(ICommandSender icommandsender, int i0, String s0, Object... aobject) { boolean flag0 = true; // CanaryMod: Fix for MultiWorld if (icommandsender instanceof TileEntityCommandBlock && !((CanaryWorld) Canary.getServer().getDefaultWorld()) .getHandle() .M() .b("commandBlockOutput")) { flag0 = false; } if (flag0) { Iterator iterator = MinecraftServer.D().ad().a.iterator(); while (iterator.hasNext()) { EntityPlayerMP entityplayermp = (EntityPlayerMP) iterator.next(); if (entityplayermp != icommandsender && MinecraftServer.D().ad().e(entityplayermp.bS)) { entityplayermp.a( "" + EnumChatFormatting.h + "" + EnumChatFormatting.u + "[" + icommandsender.c_() + ": " + entityplayermp.a(s0, aobject) + "]"); } } } if (icommandsender != MinecraftServer.D()) { MinecraftServer.D() .al() .a("[" + icommandsender.c_() + ": " + MinecraftServer.D().a(s0, aobject) + "]"); } if ((i0 & 1) != 1) { icommandsender.a(icommandsender.a(s0, aobject)); } }
public void c(int i0) { if (this.ar == 1 && i0 == 1) { this.a((StatBase) AchievementList.C); this.q.e((Entity) this); this.j = true; this.a.b(new Packet70GameEvent(4, 0)); } else { if (this.ar == 1 && i0 == 0) { this.a((StatBase) AchievementList.B); ChunkCoordinates chunkcoordinates = this.b.getWorld(this.getCanaryWorld().getName(), i0).l(); if (chunkcoordinates != null) { this.a.a( (double) chunkcoordinates.a, (double) chunkcoordinates.b, (double) chunkcoordinates.c, 0.0F, 0.0F, getCanaryWorld().getType().getId(), getCanaryWorld().getName()); } i0 = 1; } else { this.a((StatBase) AchievementList.x); } // CanaryMod onPortalUse && onDimensionSwitch Location goingTo = simulatePortalUse(i0, MinecraftServer.D().getWorld(getCanaryWorld().getName(), i0)); PortalUseHook hook = new PortalUseHook(getPlayer(), goingTo); CancelableHook hook1 = new DimensionSwitch( this.getCanaryEntity(), this.getCanaryEntity().getLocation(), goingTo); Canary.hooks().callHook(hook); Canary.hooks().callHook(hook1); if (hook.isCanceled() || hook1.isCanceled()) { return; } // else { this.b.ad().a(this, getCanaryWorld().getName(), i0); this.cp = -1; this.cm = -1; this.cn = -1; } // } }
public ServerCommandManager() { // TODO: Should we disable commands we implemented differently? this.a(new CommandTime()); this.a(new CommandGameMode()); this.a(new CommandDifficulty()); this.a(new CommandDefaultGameMode()); this.a(new CommandKill()); this.a(new CommandToggleDownfall()); this.a(new CommandWeather()); this.a(new CommandXP()); this.a(new CommandServerTp()); this.a(new CommandGive()); this.a(new CommandEffect()); this.a(new CommandEnchant()); this.a(new CommandServerEmote()); this.a(new CommandShowSeed()); this.a(new CommandHelp()); this.a(new CommandDebug()); this.a(new CommandServerMessage()); this.a(new CommandServerSay()); this.a(new CommandSetSpawnpoint()); this.a(new CommandGameRule()); this.a(new CommandClearInventory()); this.a(new ServerCommandTestFor()); this.a(new ServerCommandScoreboard()); if (MinecraftServer.D().T()) { this.a(new CommandServerOp()); this.a(new CommandServerDeop()); this.a(new CommandServerStop()); this.a(new CommandServerSaveAll()); this.a(new CommandServerSaveOff()); this.a(new CommandServerSaveOn()); this.a(new CommandServerBanIp()); this.a(new CommandServerPardonIp()); this.a(new CommandServerBan()); this.a(new CommandServerBanlist()); this.a(new CommandServerPardon()); this.a(new CommandServerKick()); this.a(new CommandServerList()); this.a(new CommandServerWhitelist()); } else { this.a(new CommandServerPublishLocal()); } CommandBase.a((IAdminCommand) this); }