mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 14:38:45 +00:00
Fixed vclip to ignore non-solid blocks
This commit is contained in:
1 parent
7861cba620
commit
bbb40fbfbf
2 files changed
+15
-6
No files matched your search
@@ -41,7 +41,7 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>craftbukkit</artifactId>
|
||||||
<version>1.3.2-R0.1</version>
|
<version>1.3.2-R0.1</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
|
|||||||
@@ -249,7 +249,11 @@ public class Backend
|
|||||||
public void garbageClean(Player player)
|
public void garbageClean(Player player)
|
||||||
{
|
{
|
||||||
String pN = player.getName();
|
String pN = player.getName();
|
||||||
micromanage.getUserManager().remove(micromanage.getUserManager().getUser(pN));
|
User user = micromanage.getUserManager().getUser(pN);
|
||||||
|
if(user != null)
|
||||||
|
{
|
||||||
|
micromanage.getUserManager().remove(user);
|
||||||
|
}
|
||||||
droppedItem.remove(pN);
|
droppedItem.remove(pN);
|
||||||
movingExempt.remove(pN);
|
movingExempt.remove(pN);
|
||||||
brokenBlock.remove(pN);
|
brokenBlock.remove(pN);
|
||||||
@@ -534,24 +538,29 @@ public class Backend
|
|||||||
boolean bs = false;
|
boolean bs = false;
|
||||||
|
|
||||||
if (player.isInsideVehicle())
|
if (player.isInsideVehicle())
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
if (from == to || from < to)
|
if (from == to || from < to)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
if (Math.round(distance.getYDifference()) < 2)
|
if (Math.round(distance.getYDifference()) < 2)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < (Math.round(distance.getYDifference())) + 1; i++)
|
for (int i = 0; i < (Math.round(distance.getYDifference())) + 1; i++)
|
||||||
{
|
{
|
||||||
Location l = new Location(player.getWorld(), player.getLocation().getX(), to + i, player.getLocation().getZ());
|
Location l = new Location(player.getWorld(), player.getLocation().getX(), to + i, player.getLocation().getZ());
|
||||||
if (l.getBlock().getTypeId() != 0 && !l.getBlock().isLiquid())
|
if (l.getBlock().getTypeId() != 0 && net.minecraft.server.Block.byId[l.getBlock().getTypeId()].material.isSolid() && !l.getBlock().isLiquid())
|
||||||
{
|
{
|
||||||
bs = true;
|
bs = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bs)
|
if (bs)
|
||||||
|
{
|
||||||
return (int) from + 3;
|
return (int) from + 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in new issue
Block a user