Java Code Examples for org.bukkit.World#setPVP()
The following examples show how to use
org.bukkit.World#setPVP() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GlobalPVPModule.java From UHC with MIT License | 5 votes |
@Override public void onEnable() { for (final World world : Bukkit.getWorlds()) { if (worlds.worldMatches(world)) { world.setPVP(true); } } }
Example 2
Source File: GlobalPVPModule.java From UHC with MIT License | 5 votes |
@Override public void onDisable() { for (final World world : Bukkit.getWorlds()) { if (worlds.worldMatches(world)) { world.setPVP(false); } } }
Example 3
Source File: GlobalPVPModule.java From UHC with MIT License | 5 votes |
@EventHandler public void on(WorldLoadEvent event) { final World world = event.getWorld(); if (worlds.worldMatches(world)) { world.setPVP(isEnabled()); } }
Example 4
Source File: Cycle.java From CardinalPGM with MIT License | 5 votes |
@Override public void run() { GenerateMap.copyWorldFromRepository(map.getFolder(), uuid); World world = new WorldCreator("matches/" + uuid.toString()).generator(new NullChunkGenerator()).createWorld(); world.setPVP(true); handler.setMatchWorld(world); handler.setMatchFile(new File("matches/" + uuid.toString() + "/")); }
Example 5
Source File: EffPvP.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override protected void execute(final Event e) { for (final World w : worlds.getArray(e)) { w.setPVP(enable); } }