committing necessary files to merge
This commit is contained in:
parent
7db748bbe1
commit
40ef3317dd
@ -466,4 +466,13 @@ public class CoreClientManager extends MiniPlugin
|
||||
{
|
||||
_loginProcessors.put(processor.getName(), processor);
|
||||
}
|
||||
|
||||
public boolean hasRank(Player player, Rank rank)
|
||||
{
|
||||
CoreClient client = Get(player);
|
||||
if (client == null)
|
||||
return false;
|
||||
|
||||
return client.GetRank().Has(rank);
|
||||
}
|
||||
}
|
@ -62,6 +62,8 @@ public class AntiHack extends MiniPlugin
|
||||
//Player Info
|
||||
private HashSet<Player> _velocityEvent = new HashSet<Player>();
|
||||
private HashMap<Player, Long> _lastMoveEvent = new HashMap<Player, Long>();
|
||||
|
||||
private HashSet<Player> _hubAttempted = new HashSet<Player>();
|
||||
|
||||
//Hack Requirements
|
||||
public int FloatHackTicks = 10;
|
||||
@ -347,7 +349,7 @@ public class AntiHack extends MiniPlugin
|
||||
{
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 2f, 0.5f);
|
||||
|
||||
if (_kick)
|
||||
if (_kick || _hubAttempted.remove(player))
|
||||
{
|
||||
player.kickPlayer(
|
||||
C.cGold + "Mineplex Anti-Cheat" + "\n" +
|
||||
@ -358,6 +360,8 @@ public class AntiHack extends MiniPlugin
|
||||
}
|
||||
else
|
||||
{
|
||||
_hubAttempted.add(player);
|
||||
|
||||
UtilPlayer.message(player, C.cGold + C.Strike + "---------------------------------------------");
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, C.cGold + "Mineplex Anti-Cheat");
|
||||
@ -452,6 +456,17 @@ public class AntiHack extends MiniPlugin
|
||||
detector.Reset(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (Iterator<Player> playerIterator = _hubAttempted.iterator(); playerIterator.hasNext();)
|
||||
{
|
||||
Player player = playerIterator.next();
|
||||
|
||||
if (!player.isOnline() || !player.isValid())
|
||||
{
|
||||
playerIterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setEnabled(boolean b)
|
||||
|
@ -1012,30 +1012,29 @@ public class UHC extends TeamGame
|
||||
if (event.getMessage().startsWith("/kill"))
|
||||
event.setCancelled(true);
|
||||
|
||||
if (event.getMessage().startsWith("/uhc time day"))
|
||||
{
|
||||
this.WorldTimeSet = 4000;
|
||||
event.setCancelled(true);
|
||||
|
||||
Announce(event.getPlayer().getName() + " set time to Always Day!");
|
||||
}
|
||||
|
||||
if (event.getMessage().startsWith("/uhc time night"))
|
||||
{
|
||||
this.WorldTimeSet = 16000;
|
||||
event.setCancelled(true);
|
||||
|
||||
Announce(event.getPlayer().getName() + " set time to Always Night!");
|
||||
}
|
||||
|
||||
if (event.getMessage().startsWith("/uhc time cycle"))
|
||||
{
|
||||
this.WorldTimeSet = -1;
|
||||
event.setCancelled(true);
|
||||
|
||||
Announce(event.getPlayer().getName() + " set time to Day and Night!");
|
||||
}
|
||||
|
||||
// if (event.getMessage().startsWith("/uhc time day"))
|
||||
// {
|
||||
// this.WorldTimeSet = 4000;
|
||||
// event.setCancelled(true);
|
||||
//
|
||||
// Announce(event.getPlayer().getName() + " set time to Always Day!");
|
||||
// }
|
||||
//
|
||||
// if (event.getMessage().startsWith("/uhc time night"))
|
||||
// {
|
||||
// this.WorldTimeSet = 16000;
|
||||
// event.setCancelled(true);
|
||||
//
|
||||
// Announce(event.getPlayer().getName() + " set time to Always Night!");
|
||||
// }
|
||||
//
|
||||
// if (event.getMessage().startsWith("/uhc time cycle"))
|
||||
// {
|
||||
// this.WorldTimeSet = -1;
|
||||
// event.setCancelled(true);
|
||||
//
|
||||
// Announce(event.getPlayer().getName() + " set time to Day and Night!");
|
||||
// }
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
|
@ -28,6 +28,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
@ -207,7 +208,11 @@ public class GameHostManager implements Listener
|
||||
if (Manager.GetGame() == null)
|
||||
return;
|
||||
|
||||
if (UtilGear.isMat(player.getInventory().getItem(5), Material.SPECKLED_MELON))
|
||||
if (UtilGear.isMat(player.getInventory().getItem(7), Material.SPECKLED_MELON))
|
||||
return;
|
||||
|
||||
if (player.getOpenInventory().getType() != InventoryType.CRAFTING &&
|
||||
player.getOpenInventory().getType() != InventoryType.CREATIVE)
|
||||
return;
|
||||
|
||||
player.getInventory().setItem(7, ItemStackFactory.Instance.CreateStack(Material.SPECKLED_MELON, (byte)0, 1, C.cGreen + C.Bold + "/menu"));
|
||||
|
Loading…
Reference in New Issue
Block a user