Remove debug

This commit is contained in:
Sam 2018-07-28 23:19:32 +01:00 committed by Alexander Meech
parent 76a2386f23
commit d41fb0c9b4
5 changed files with 41 additions and 47 deletions

View File

@ -243,8 +243,6 @@ public class ClansGame extends MiniPlugin
@EventHandler(priority = EventPriority.MONITOR)
public void teleport(PlayerTeleportEvent event)
{
Bukkit.broadcastMessage(event.getPlayer().getName() + " : " + event.getCause() + " : " + event.isCancelled());
if (event.getCause() == TeleportCause.UNKNOWN)
{
UtilPlayer.closeInventoryIfOpen(event.getPlayer());

View File

@ -1,7 +1,11 @@
package mineplex.game.clans.clans.loot;
import org.bukkit.Bukkit;
import org.bukkit.Location;
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 mineplex.core.common.weight.WeightSet;
@ -258,4 +262,10 @@ public class LootManager
{
return _rareSet.generateRandom().getItemStack();
}
@EventHandler(priority = EventPriority.MONITOR)
public void itemSpawn(ItemSpawnEvent event)
{
Bukkit.broadcastMessage(event.getEventName() + " " + event.isCancelled() + " " + event.getEntity().getItemStack());
}
}

View File

@ -450,7 +450,7 @@ public class AltManager extends MiniPlugin
});
}
@EventHandler(priority = EventPriority.HIGH)
// @EventHandler(priority = EventPriority.HIGH)
public void onLogin(AsyncPlayerPreLoginEvent event)
{
if (event.getLoginResult() != Result.ALLOWED)

View File

@ -41,18 +41,14 @@ public class HiddenChestManager implements Listener
if (packet.equals(_lastPacket))
{
packetInfo.getPlayer().sendMessage("Already modified");
return;
}
packetInfo.getPlayer().sendMessage("b= " + packet.b + " c=" + packet.c);
// b - Action Id
// c - Action Param - How many people have the chest open
// a - Block Position
if (packet.b == 1 && packet.c > 0 && _openChest.containsValue(packet.a))
{
packetInfo.getPlayer().sendMessage("Removed viewer");
packet.c--;
_lastPacket = packet;
}
@ -79,25 +75,18 @@ public class HiddenChestManager implements Listener
}
Location location = event.getClickedBlock().getLocation();
player.sendMessage("Opening silently...");
_openChest.put(player, new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
}
@EventHandler
public void handleClose(InventoryCloseEvent event)
{
if (_openChest.remove(event.getPlayer()) != null)
{
event.getPlayer().sendMessage("Removed");
}
_openChest.remove(event.getPlayer());
}
@EventHandler
public void handleClose(PlayerQuitEvent event)
{
if (_openChest.remove(event.getPlayer()) != null)
{
event.getPlayer().sendMessage("Removed");
}
_openChest.remove(event.getPlayer());
}
}

View File

@ -2,6 +2,33 @@ package mineplex.game.clans.spawn;
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.common.util.F;
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.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 static final int SPAWN_RADIUS = 32;
@ -335,7 +334,6 @@ public class Spawn extends MiniPlugin
{
if (getSpawnWorld().getTime() < 12000)
{
Bukkit.broadcastMessage("Mob spawning disabled");
getSpawnWorld().setGameRuleValue("doMobSpawning", "false");
}
}
@ -343,7 +341,6 @@ public class Spawn extends MiniPlugin
{
if (getSpawnWorld().getTime() > 12000)
{
Bukkit.broadcastMessage("Mob spawning enabled");
getSpawnWorld().setGameRuleValue("doMobSpawning", "true");
}
}