// ==================================================================
// This file is part of Player API.
//
// Player API is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// Player API is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License and the GNU General Public License along with Player API.
// If not, see <http://www.gnu.org/licenses/>.
// ==================================================================
package api.player.server;
public abstract class ServerPlayerBase
{
public ServerPlayerBase(ServerPlayerAPI playerAPI)
{
this.internalServerPlayerAPI = playerAPI;
this.playerAPI = playerAPI.player;
this.player = playerAPI.player.getEntityPlayerMP();
}
public void beforeBaseAttach(boolean onTheFly)
{
}
public void afterBaseAttach(boolean onTheFly)
{
}
public void beforeLocalConstructing(net.minecraft.server.MinecraftServer paramMinecraftServer, net.minecraft.world.WorldServer paramWorldServer, com.mojang.authlib.GameProfile paramGameProfile, net.minecraft.server.management.ItemInWorldManager paramItemInWorldManager)
{
}
public void afterLocalConstructing(net.minecraft.server.MinecraftServer paramMinecraftServer, net.minecraft.world.WorldServer paramWorldServer, com.mojang.authlib.GameProfile paramGameProfile, net.minecraft.server.management.ItemInWorldManager paramItemInWorldManager)
{
}
public void beforeBaseDetach(boolean onTheFly)
{
}
public void afterBaseDetach(boolean onTheFly)
{
}
public Object dynamic(String key, Object[] parameters)
{
return internalServerPlayerAPI.dynamicOverwritten(key, parameters, this);
}
public final int hashCode()
{
return super.hashCode();
}
public void beforeAddExhaustion(float paramFloat)
{
}
public void addExhaustion(float paramFloat)
{
ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenAddExhaustion(this);
if(overwritten == null)
playerAPI.localAddExhaustion(paramFloat);
else if(overwritten != this)
overwritten.addExhaustion(paramFloat);
}
public void afterAddExhaustion(float paramFloat)
{
}
public void beforeAddExperience(int paramInt)
{
}
public void addExperience(int paramInt)
{
ServerPlayerBase overwritten = internalServerPlayerAPI.GetOverwrittenAddExperience(this);
if(overwritten == null)
playerAPI.localAddExperience(paramInt);
else if(overwritten != this)
overwritten.addExperience(paramInt);
}
public void afterAddExperience(int paramInt)
{
}
public void beforeAddExperienceLevel(int paramInt)
{
}
public void addExperienceLevel(int paramInt)