1.14 obsidian exploit patch.
This commit is contained in:
parent
7233e8e819
commit
3f20d67fd7
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<groupId>com.massivecraft</groupId>
|
<groupId>com.massivecraft</groupId>
|
||||||
<artifactId>Factions</artifactId>
|
<artifactId>Factions</artifactId>
|
||||||
<version>1.6.9.5-U0.2.1-1.4-BETA</version>
|
<version>1.6.9.5-U0.2.1-1.4.1-BETA</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>SaberFactions</name>
|
<name>SaberFactions</name>
|
||||||
|
@ -28,11 +28,24 @@ public class FactionsExploitListener implements Listener {
|
|||||||
|
|
||||||
// thanks to ObGenBlocker and WorldGuard for this method
|
// thanks to ObGenBlocker and WorldGuard for this method
|
||||||
Block block = event.getToBlock();
|
Block block = event.getToBlock();
|
||||||
|
|
||||||
|
// Added this so it wont die on 1.14 :)
|
||||||
|
if (SaberFactions.plugin.mc114) {
|
||||||
|
Material source = event.getBlock().getType();
|
||||||
|
Material target = block.getType();
|
||||||
|
if ((target == Material.REDSTONE_WIRE || target == Material.TRIPWIRE) && (source == Material.AIR || source == Material.LEGACY_STATIONARY_LAVA || source == Material.LEGACY_LAVA)) {
|
||||||
|
block.setType(Material.AIR);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// run this for all versions below 1.14
|
||||||
int source = event.getBlock().getType().getId();
|
int source = event.getBlock().getType().getId();
|
||||||
int target = block.getType().getId();
|
int target = block.getType().getId();
|
||||||
if ((target == 55 || target == 132) && (source == 0 || source == 10 || source == 11)) {
|
if ((target == 55 || target == 132) && (source == 0 || source == 10 || source == 11)) {
|
||||||
block.setType(Material.AIR);
|
block.setType(Material.AIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||||
|
Loading…
Reference in New Issue
Block a user