Remove debug
This commit is contained in:
parent
76a2386f23
commit
d41fb0c9b4
@ -243,8 +243,6 @@ public class ClansGame extends MiniPlugin
|
|||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void teleport(PlayerTeleportEvent event)
|
public void teleport(PlayerTeleportEvent event)
|
||||||
{
|
{
|
||||||
Bukkit.broadcastMessage(event.getPlayer().getName() + " : " + event.getCause() + " : " + event.isCancelled());
|
|
||||||
|
|
||||||
if (event.getCause() == TeleportCause.UNKNOWN)
|
if (event.getCause() == TeleportCause.UNKNOWN)
|
||||||
{
|
{
|
||||||
UtilPlayer.closeInventoryIfOpen(event.getPlayer());
|
UtilPlayer.closeInventoryIfOpen(event.getPlayer());
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
package mineplex.game.clans.clans.loot;
|
package mineplex.game.clans.clans.loot;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
|
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import mineplex.core.common.weight.WeightSet;
|
import mineplex.core.common.weight.WeightSet;
|
||||||
@ -257,5 +261,11 @@ public class LootManager
|
|||||||
public ItemStack getRareItemStack()
|
public ItemStack getRareItemStack()
|
||||||
{
|
{
|
||||||
return _rareSet.generateRandom().getItemStack();
|
return _rareSet.generateRandom().getItemStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
|
public void itemSpawn(ItemSpawnEvent event)
|
||||||
|
{
|
||||||
|
Bukkit.broadcastMessage(event.getEventName() + " " + event.isCancelled() + " " + event.getEntity().getItemStack());
|
||||||
|
}
|
||||||
}
|
}
|
@ -450,7 +450,7 @@ public class AltManager extends MiniPlugin
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
// @EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onLogin(AsyncPlayerPreLoginEvent event)
|
public void onLogin(AsyncPlayerPreLoginEvent event)
|
||||||
{
|
{
|
||||||
if (event.getLoginResult() != Result.ALLOWED)
|
if (event.getLoginResult() != Result.ALLOWED)
|
||||||
|
@ -41,18 +41,14 @@ public class HiddenChestManager implements Listener
|
|||||||
|
|
||||||
if (packet.equals(_lastPacket))
|
if (packet.equals(_lastPacket))
|
||||||
{
|
{
|
||||||
packetInfo.getPlayer().sendMessage("Already modified");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
packetInfo.getPlayer().sendMessage("b= " + packet.b + " c=" + packet.c);
|
|
||||||
|
|
||||||
// b - Action Id
|
// b - Action Id
|
||||||
// c - Action Param - How many people have the chest open
|
// c - Action Param - How many people have the chest open
|
||||||
// a - Block Position
|
// a - Block Position
|
||||||
if (packet.b == 1 && packet.c > 0 && _openChest.containsValue(packet.a))
|
if (packet.b == 1 && packet.c > 0 && _openChest.containsValue(packet.a))
|
||||||
{
|
{
|
||||||
packetInfo.getPlayer().sendMessage("Removed viewer");
|
|
||||||
packet.c--;
|
packet.c--;
|
||||||
_lastPacket = packet;
|
_lastPacket = packet;
|
||||||
}
|
}
|
||||||
@ -79,25 +75,18 @@ public class HiddenChestManager implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
Location location = event.getClickedBlock().getLocation();
|
Location location = event.getClickedBlock().getLocation();
|
||||||
player.sendMessage("Opening silently...");
|
|
||||||
_openChest.put(player, new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
|
_openChest.put(player, new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void handleClose(InventoryCloseEvent event)
|
public void handleClose(InventoryCloseEvent event)
|
||||||
{
|
{
|
||||||
if (_openChest.remove(event.getPlayer()) != null)
|
_openChest.remove(event.getPlayer());
|
||||||
{
|
|
||||||
event.getPlayer().sendMessage("Removed");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void handleClose(PlayerQuitEvent event)
|
public void handleClose(PlayerQuitEvent event)
|
||||||
{
|
{
|
||||||
if (_openChest.remove(event.getPlayer()) != null)
|
_openChest.remove(event.getPlayer());
|
||||||
{
|
|
||||||
event.getPlayer().sendMessage("Removed");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,33 @@ package mineplex.game.clans.spawn;
|
|||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Effect;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.ItemFrame;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Monster;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
|
import org.bukkit.event.block.BlockBurnEvent;
|
||||||
|
import org.bukkit.event.block.BlockFromToEvent;
|
||||||
|
import org.bukkit.event.block.BlockIgniteEvent;
|
||||||
|
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
|
||||||
|
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
|
import org.bukkit.event.entity.EntityTargetEvent;
|
||||||
|
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||||
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
|
import org.bukkit.event.player.PlayerVelocityEvent;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
import mineplex.core.MiniPlugin;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilParticle;
|
import mineplex.core.common.util.UtilParticle;
|
||||||
@ -18,34 +45,6 @@ import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
|||||||
import mineplex.minecraft.game.classcombat.item.event.WebTossEvent;
|
import mineplex.minecraft.game.classcombat.item.event.WebTossEvent;
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Effect;
|
|
||||||
import org.bukkit.GameMode;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.World;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.entity.ItemFrame;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
|
||||||
import org.bukkit.entity.Monster;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.EventPriority;
|
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
|
||||||
import org.bukkit.event.block.BlockBurnEvent;
|
|
||||||
import org.bukkit.event.block.BlockFromToEvent;
|
|
||||||
import org.bukkit.event.block.BlockIgniteEvent;
|
|
||||||
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
|
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
|
||||||
import org.bukkit.event.entity.EntityTargetEvent;
|
|
||||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
|
||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
|
||||||
import org.bukkit.event.player.PlayerVelocityEvent;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
public class Spawn extends MiniPlugin
|
public class Spawn extends MiniPlugin
|
||||||
{
|
{
|
||||||
public static final int SPAWN_RADIUS = 32;
|
public static final int SPAWN_RADIUS = 32;
|
||||||
@ -335,7 +334,6 @@ public class Spawn extends MiniPlugin
|
|||||||
{
|
{
|
||||||
if (getSpawnWorld().getTime() < 12000)
|
if (getSpawnWorld().getTime() < 12000)
|
||||||
{
|
{
|
||||||
Bukkit.broadcastMessage("Mob spawning disabled");
|
|
||||||
getSpawnWorld().setGameRuleValue("doMobSpawning", "false");
|
getSpawnWorld().setGameRuleValue("doMobSpawning", "false");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -343,7 +341,6 @@ public class Spawn extends MiniPlugin
|
|||||||
{
|
{
|
||||||
if (getSpawnWorld().getTime() > 12000)
|
if (getSpawnWorld().getTime() > 12000)
|
||||||
{
|
{
|
||||||
Bukkit.broadcastMessage("Mob spawning enabled");
|
|
||||||
getSpawnWorld().setGameRuleValue("doMobSpawning", "true");
|
getSpawnWorld().setGameRuleValue("doMobSpawning", "true");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user