added announcement logging
fixed creeper explosion disable for uhc fixed player logout thing for UHC?
This commit is contained in:
parent
e49b92d280
commit
34c333dac9
@ -56,6 +56,9 @@ public class Creature extends MiniPlugin
|
||||
@EventHandler
|
||||
public void Spawn(CreatureSpawnEvent event)
|
||||
{
|
||||
if (_disableCustom)
|
||||
return;
|
||||
|
||||
if (event.getEntity() instanceof LivingEntity)
|
||||
((LivingEntity)event.getEntity()).setCanPickupItems(false);
|
||||
|
||||
@ -239,6 +242,9 @@ public class Creature extends MiniPlugin
|
||||
@EventHandler
|
||||
public void CustomCreeperExplode(EntityExplodeEvent event)
|
||||
{
|
||||
if (_disableCustom)
|
||||
return;
|
||||
|
||||
if (!(event.getEntity() instanceof Creeper))
|
||||
return;
|
||||
|
||||
|
@ -929,6 +929,8 @@ public abstract class Game implements Listener
|
||||
|
||||
UtilPlayer.message(player, message);
|
||||
}
|
||||
|
||||
System.out.println("[Announcement] " + message);
|
||||
}
|
||||
|
||||
public boolean AdvertiseText(GameLobbyManager gameLobbyManager, int _advertiseStage)
|
||||
|
@ -551,13 +551,16 @@ public class UHC extends TeamGame
|
||||
Announce(team.GetColor() + C.Bold + player.getName() + " was killed for disconnecting during combat.");
|
||||
|
||||
player.damage(5000);
|
||||
|
||||
//team.SetPlayerState(player, PlayerState.OUT);
|
||||
team.RemovePlayer(player);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!team.IsAlive(player))
|
||||
{
|
||||
team.RemovePlayer(player);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
_rejoinTime.put(player, System.currentTimeMillis());
|
||||
GetLocationStore().put(player.getName(), player.getLocation());
|
||||
|
||||
@ -1069,10 +1072,12 @@ public class UHC extends TeamGame
|
||||
|
||||
String health = " - " + col;
|
||||
|
||||
if (((int)player.getHealth()) % 2 == 0)
|
||||
health += (int)(player.getHealth()/2);
|
||||
int hp = (int)(player.getHealth() + 0.9999999999);
|
||||
|
||||
if (hp % 2 == 0)
|
||||
health += (int)(hp/2);
|
||||
else
|
||||
health += UtilMath.trim(1, player.getHealth()/2d);
|
||||
health += UtilMath.trim(1, hp/2d);
|
||||
|
||||
String name = team.GetColor() + player.getName();
|
||||
|
||||
@ -1122,7 +1127,6 @@ public class UHC extends TeamGame
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean CanJoinTeam(GameTeam team)
|
||||
{
|
||||
|
@ -23,7 +23,6 @@ import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -34,7 +33,6 @@ import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
|
Loading…
Reference in New Issue
Block a user