2013-12-07 23:06:11 +01:00
|
|
|
package mekanism.client;
|
|
|
|
|
|
|
|
import mekanism.common.Mekanism;
|
2013-12-09 23:54:59 +01:00
|
|
|
import net.minecraft.client.Minecraft;
|
2013-12-07 23:06:11 +01:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import cpw.mods.fml.common.IPlayerTracker;
|
2013-12-22 07:49:55 +01:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
2013-12-07 23:06:11 +01:00
|
|
|
|
2013-12-22 07:49:55 +01:00
|
|
|
@SideOnly(Side.CLIENT)
|
2013-12-07 23:06:11 +01:00
|
|
|
public class ClientPlayerTracker implements IPlayerTracker
|
|
|
|
{
|
|
|
|
@Override
|
|
|
|
public void onPlayerLogin(EntityPlayer player) {}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onPlayerLogout(EntityPlayer player)
|
|
|
|
{
|
|
|
|
Mekanism.jetpackOn.remove(player);
|
2013-12-09 23:54:59 +01:00
|
|
|
|
|
|
|
if(player.username.equals(Minecraft.getMinecraft().thePlayer.username))
|
|
|
|
{
|
|
|
|
if(Mekanism.voiceServerEnabled)
|
|
|
|
{
|
|
|
|
if(MekanismClient.voiceClient != null)
|
|
|
|
{
|
|
|
|
MekanismClient.voiceClient.disconnect();
|
|
|
|
MekanismClient.voiceClient = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ClientTickHandler.tickingSet.clear();
|
2013-12-11 00:51:16 +01:00
|
|
|
Mekanism.proxy.unloadSoundHandler();
|
|
|
|
|
2013-12-09 23:54:59 +01:00
|
|
|
Mekanism.jetpackOn.clear();
|
|
|
|
Mekanism.gasmaskOn.clear();
|
2013-12-22 07:49:55 +01:00
|
|
|
|
|
|
|
Mekanism.proxy.loadConfiguration();
|
|
|
|
|
|
|
|
System.out.println("[Mekanism] Reloaded config.");
|
2013-12-09 23:54:59 +01:00
|
|
|
}
|
2013-12-07 23:06:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onPlayerChangedDimension(EntityPlayer player)
|
|
|
|
{
|
|
|
|
Mekanism.jetpackOn.remove(player);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onPlayerRespawn(EntityPlayer player) {}
|
|
|
|
}
|