geforkt von Mirrors/Paper
Added onBlockCanBuild to loader
By: durron597 <martin.jared@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
b5cbcfbcdb
Commit
29cb3a3a79
@ -35,7 +35,7 @@ public class SampleBlockListener extends BlockListener {
|
|||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
|
|
||||||
if (block.getType() == 81) {
|
if (block.getType() == 81) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ import java.util.regex.Pattern;
|
|||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.BlockListener;
|
import org.bukkit.event.block.*;
|
||||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
|
||||||
import org.bukkit.event.player.*;
|
import org.bukkit.event.player.*;
|
||||||
import org.bukkit.plugin.*;
|
import org.bukkit.plugin.*;
|
||||||
|
|
||||||
@ -112,6 +111,12 @@ public final class JavaPluginLoader implements PluginLoader {
|
|||||||
case BLOCK_PHYSICS:
|
case BLOCK_PHYSICS:
|
||||||
trueListener.onBlockPhysics((BlockPhysicsEvent)event);
|
trueListener.onBlockPhysics((BlockPhysicsEvent)event);
|
||||||
break;
|
break;
|
||||||
|
case BLOCK_CANBUILD:
|
||||||
|
trueListener.onBlockCanBuild((BlockCanBuildEvent)event);
|
||||||
|
break;
|
||||||
|
case BLOCK_FLOW:
|
||||||
|
trueListener.onBlockFlow((BlockFromToEvent)event);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren