mirror of
https://github.com/taoneill/war.git
synced 2024-11-30 14:13:23 +01:00
Closes gh-358. Update for compatibility with the new Bukkit Events system (i.e. CB #1782+).
This commit is contained in:
parent
4e1b5670a4
commit
bbdfef0ca6
@ -2,6 +2,7 @@
|
|||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java"/>
|
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java"/>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
||||||
|
<classpathentry kind="src" path="src/main/resources"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
|
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||||
|
@ -14,8 +14,6 @@ import org.bukkit.command.Command;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
|
||||||
import org.bukkit.event.Event.Priority;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
import org.bukkit.inventory.PlayerInventory;
|
||||||
import org.bukkit.plugin.PluginDescriptionFile;
|
import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
@ -52,7 +50,6 @@ import com.tommytony.war.utils.PlayerState;
|
|||||||
*/
|
*/
|
||||||
public class War extends JavaPlugin {
|
public class War extends JavaPlugin {
|
||||||
public static War war;
|
public static War war;
|
||||||
private static boolean loadedOnce = false;
|
|
||||||
|
|
||||||
// general
|
// general
|
||||||
private WarPlayerListener playerListener = new WarPlayerListener();
|
private WarPlayerListener playerListener = new WarPlayerListener();
|
||||||
@ -126,45 +123,12 @@ public class War extends JavaPlugin {
|
|||||||
isSpoutServer = false;
|
isSpoutServer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register hooks
|
// Register events
|
||||||
if (!War.loadedOnce) {
|
|
||||||
War.loadedOnce = true; // This prevented multiple hookups of the same listener
|
|
||||||
|
|
||||||
PluginManager pm = this.getServer().getPluginManager();
|
PluginManager pm = this.getServer().getPluginManager();
|
||||||
|
pm.registerEvents(this.playerListener, this);
|
||||||
pm.registerEvent(Event.Type.PLAYER_QUIT, this.playerListener, Priority.Normal, this);
|
pm.registerEvents(this.entityListener, this);
|
||||||
pm.registerEvent(Event.Type.PLAYER_KICK, this.playerListener, Priority.Normal, this);
|
pm.registerEvents(this.blockListener, this);
|
||||||
pm.registerEvent(Event.Type.PLAYER_MOVE, this.playerListener, Priority.Normal, this);
|
pm.registerEvents(this.serverListener, this);
|
||||||
pm.registerEvent(Event.Type.PLAYER_PICKUP_ITEM, this.playerListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.INVENTORY_OPEN, this.playerListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.PLAYER_DROP_ITEM, this.playerListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, this.playerListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.PLAYER_INTERACT, this.playerListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.PLAYER_TOGGLE_SNEAK, this.playerListener, Priority.Normal, this);
|
|
||||||
|
|
||||||
pm.registerEvent(Event.Type.ENTITY_EXPLODE, this.entityListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.ENTITY_DAMAGE, this.entityListener, Priority.High, this);
|
|
||||||
pm.registerEvent(Event.Type.ENTITY_COMBUST, this.entityListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.CREATURE_SPAWN, this.entityListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.ENTITY_REGAIN_HEALTH, this.entityListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.FOOD_LEVEL_CHANGE, this.entityListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.ENTITY_DEATH, this.entityListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.EXPLOSION_PRIME, this.entityListener, Priority.Normal, this);
|
|
||||||
|
|
||||||
pm.registerEvent(Event.Type.BLOCK_PLACE, this.blockListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.BLOCK_DAMAGE, this.blockListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.BLOCK_BREAK, this.blockListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.BLOCK_PISTON_EXTEND, this.blockListener, Priority.Normal, this);
|
|
||||||
pm.registerEvent(Event.Type.BLOCK_PISTON_RETRACT, this.blockListener, Priority.Normal, this);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pm.registerEvent(Event.Type.PLUGIN_DISABLE, this.serverListener, Priority.Normal, this);
|
|
||||||
|
|
||||||
if (this.isSpoutServer()) {
|
|
||||||
pm.registerEvent(Event.Type.CUSTOM_EVENT, new WarSpoutListener(this), Priority.Low, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add defaults
|
// Add defaults
|
||||||
warConfig.put(WarConfig.BUILDINZONESONLY, false);
|
warConfig.put(WarConfig.BUILDINZONESONLY, false);
|
||||||
|
@ -8,9 +8,10 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.event.block.BlockDamageEvent;
|
import org.bukkit.event.block.BlockDamageEvent;
|
||||||
import org.bukkit.event.block.BlockListener;
|
|
||||||
import org.bukkit.event.block.BlockPistonExtendEvent;
|
import org.bukkit.event.block.BlockPistonExtendEvent;
|
||||||
import org.bukkit.event.block.BlockPistonRetractEvent;
|
import org.bukkit.event.block.BlockPistonRetractEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
@ -24,7 +25,6 @@ import com.tommytony.war.FlagReturn;
|
|||||||
import com.tommytony.war.Monument;
|
import com.tommytony.war.Monument;
|
||||||
import com.tommytony.war.Team;
|
import com.tommytony.war.Team;
|
||||||
import com.tommytony.war.Warzone;
|
import com.tommytony.war.Warzone;
|
||||||
import com.tommytony.war.config.TeamConfig;
|
|
||||||
import com.tommytony.war.config.WarConfig;
|
import com.tommytony.war.config.WarConfig;
|
||||||
import com.tommytony.war.config.WarzoneConfig;
|
import com.tommytony.war.config.WarzoneConfig;
|
||||||
import com.tommytony.war.spout.SpoutMessenger;
|
import com.tommytony.war.spout.SpoutMessenger;
|
||||||
@ -34,13 +34,13 @@ import com.tommytony.war.spout.SpoutMessenger;
|
|||||||
* @author tommytony
|
* @author tommytony
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class WarBlockListener extends BlockListener {
|
public class WarBlockListener implements Listener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see BlockListener.onBlockPlace()
|
* @see BlockListener.onBlockPlace()
|
||||||
*/
|
*/
|
||||||
@Override
|
@EventHandler(event = BlockPlaceEvent.class)
|
||||||
public void onBlockPlace(BlockPlaceEvent event) {
|
public void onBlockPlace(final BlockPlaceEvent event) {
|
||||||
if (!War.war.isLoaded()) {
|
if (!War.war.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -163,8 +163,9 @@ public class WarBlockListener extends BlockListener {
|
|||||||
event.getPlayer().setItemInHand(newItemInHand);
|
event.getPlayer().setItemInHand(newItemInHand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(event = BlockPistonExtendEvent.class)
|
||||||
// Do not allow moving of block into or from important zones
|
// Do not allow moving of block into or from important zones
|
||||||
public void onBlockPistonExtend(BlockPistonExtendEvent event) {
|
public void onBlockPistonExtend(final BlockPistonExtendEvent event) {
|
||||||
Warzone zone = Warzone.getZoneByLocation(event.getBlock().getLocation());
|
Warzone zone = Warzone.getZoneByLocation(event.getBlock().getLocation());
|
||||||
if (zone!=null) {
|
if (zone!=null) {
|
||||||
for (Block b : event.getBlocks()) {
|
for (Block b : event.getBlocks()) {
|
||||||
@ -179,7 +180,9 @@ public class WarBlockListener extends BlockListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void onBlockPistonRetract(BlockPistonRetractEvent event) {
|
|
||||||
|
@EventHandler(event = BlockPistonRetractEvent.class)
|
||||||
|
public void onBlockPistonRetract(final BlockPistonRetractEvent event) {
|
||||||
Warzone zone = Warzone.getZoneByLocation(event.getBlock().getLocation());
|
Warzone zone = Warzone.getZoneByLocation(event.getBlock().getLocation());
|
||||||
if (zone!=null) {
|
if (zone!=null) {
|
||||||
Block b = event.getBlock().getRelative(event.getDirection(), 2);
|
Block b = event.getBlock().getRelative(event.getDirection(), 2);
|
||||||
@ -193,8 +196,8 @@ public class WarBlockListener extends BlockListener {
|
|||||||
/**
|
/**
|
||||||
* @see BlockListener.onBlockBreak()
|
* @see BlockListener.onBlockBreak()
|
||||||
*/
|
*/
|
||||||
@Override
|
@EventHandler(event = BlockBreakEvent.class)
|
||||||
public void onBlockBreak(BlockBreakEvent event) {
|
public void onBlockBreak(final BlockBreakEvent event) {
|
||||||
if (!War.war.isLoaded()) {
|
if (!War.war.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -205,7 +208,8 @@ public class WarBlockListener extends BlockListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBlockDamage(BlockDamageEvent event) {
|
@EventHandler(event = BlockDamageEvent.class)
|
||||||
|
public void onBlockDamage(final BlockDamageEvent event) {
|
||||||
if (!War.war.isLoaded()) {
|
if (!War.war.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -18,17 +18,18 @@ import org.bukkit.entity.Entity;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
import org.bukkit.entity.TNTPrimed;
|
import org.bukkit.entity.TNTPrimed;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||||
import org.bukkit.event.entity.EntityCombustEvent;
|
import org.bukkit.event.entity.EntityCombustEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||||
import org.bukkit.event.entity.EntityListener;
|
|
||||||
import org.bukkit.event.entity.EntityRegainHealthEvent;
|
import org.bukkit.event.entity.EntityRegainHealthEvent;
|
||||||
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
||||||
|
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
||||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.getspout.spoutapi.SpoutManager;
|
import org.getspout.spoutapi.SpoutManager;
|
||||||
@ -50,7 +51,7 @@ import com.tommytony.war.utils.DeferredBlockReset;
|
|||||||
* @author tommytony, Tim Düsterhus
|
* @author tommytony, Tim Düsterhus
|
||||||
* @package bukkit.tommytony.war
|
* @package bukkit.tommytony.war
|
||||||
*/
|
*/
|
||||||
public class WarEntityListener extends EntityListener {
|
public class WarEntityListener implements Listener {
|
||||||
|
|
||||||
private final Random killSeed = new Random();
|
private final Random killSeed = new Random();
|
||||||
|
|
||||||
@ -250,8 +251,8 @@ public class WarEntityListener extends EntityListener {
|
|||||||
*
|
*
|
||||||
* @see EntityListener.onEntityExplode()
|
* @see EntityListener.onEntityExplode()
|
||||||
*/
|
*/
|
||||||
@Override
|
@EventHandler(event = EntityExplodeEvent.class)
|
||||||
public void onEntityExplode(EntityExplodeEvent event) {
|
public void onEntityExplode(final EntityExplodeEvent event) {
|
||||||
if (!War.war.isLoaded()) {
|
if (!War.war.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -365,8 +366,8 @@ public class WarEntityListener extends EntityListener {
|
|||||||
*
|
*
|
||||||
* @see EntityListener.onEntityDamage()
|
* @see EntityListener.onEntityDamage()
|
||||||
*/
|
*/
|
||||||
@Override
|
@EventHandler(event = EntityDamageEvent.class)
|
||||||
public void onEntityDamage(EntityDamageEvent event) {
|
public void onEntityDamage(final EntityDamageEvent event) {
|
||||||
if (!War.war.isLoaded()) {
|
if (!War.war.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -410,8 +411,8 @@ public class WarEntityListener extends EntityListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = EntityCombustEvent.class)
|
||||||
public void onEntityCombust(EntityCombustEvent event) {
|
public void onEntityCombust(final EntityCombustEvent event) {
|
||||||
if (!War.war.isLoaded()) {
|
if (!War.war.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -436,8 +437,8 @@ public class WarEntityListener extends EntityListener {
|
|||||||
*
|
*
|
||||||
* @see EntityListener.onCreatureSpawn()
|
* @see EntityListener.onCreatureSpawn()
|
||||||
*/
|
*/
|
||||||
@Override
|
@EventHandler(event = CreatureSpawnEvent.class)
|
||||||
public void onCreatureSpawn(CreatureSpawnEvent event) {
|
public void onCreatureSpawn(final CreatureSpawnEvent event) {
|
||||||
if (!War.war.isLoaded()) {
|
if (!War.war.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -454,8 +455,8 @@ public class WarEntityListener extends EntityListener {
|
|||||||
*
|
*
|
||||||
* @see EntityListener.onEntityRegainHealth()
|
* @see EntityListener.onEntityRegainHealth()
|
||||||
*/
|
*/
|
||||||
@Override
|
@EventHandler(event = EntityRegainHealthEvent.class)
|
||||||
public void onEntityRegainHealth(EntityRegainHealthEvent event) {
|
public void onEntityRegainHealth(final EntityRegainHealthEvent event) {
|
||||||
if (!War.war.isLoaded() ||
|
if (!War.war.isLoaded() ||
|
||||||
(event.getRegainReason() != RegainReason.REGEN
|
(event.getRegainReason() != RegainReason.REGEN
|
||||||
&& event.getRegainReason() != RegainReason.EATING
|
&& event.getRegainReason() != RegainReason.EATING
|
||||||
@ -484,8 +485,8 @@ public class WarEntityListener extends EntityListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = FoodLevelChangeEvent.class)
|
||||||
public void onFoodLevelChange(FoodLevelChangeEvent event) {
|
public void onFoodLevelChange(final FoodLevelChangeEvent event) {
|
||||||
if (!War.war.isLoaded() || !(event.getEntity() instanceof Player)) {
|
if (!War.war.isLoaded() || !(event.getEntity() instanceof Player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -498,8 +499,8 @@ public class WarEntityListener extends EntityListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = EntityDeathEvent.class)
|
||||||
public void onEntityDeath(EntityDeathEvent event) {
|
public void onEntityDeath(final EntityDeathEvent event) {
|
||||||
if (!War.war.isLoaded() || !(event.getEntity() instanceof Player)) {
|
if (!War.war.isLoaded() || !(event.getEntity() instanceof Player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -516,8 +517,8 @@ public class WarEntityListener extends EntityListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = ExplosionPrimeEvent.class)
|
||||||
public void onExplosionPrime(ExplosionPrimeEvent event) {
|
public void onExplosionPrime(final ExplosionPrimeEvent event) {
|
||||||
if (!War.war.isLoaded()) {
|
if (!War.war.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -11,14 +11,14 @@ import org.bukkit.craftbukkit.entity.CraftItem;
|
|||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event.Result;
|
import org.bukkit.event.Event.Result;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerInventoryEvent;
|
import org.bukkit.event.player.PlayerInventoryEvent;
|
||||||
import org.bukkit.event.player.PlayerKickEvent;
|
import org.bukkit.event.player.PlayerKickEvent;
|
||||||
import org.bukkit.event.player.PlayerListener;
|
|
||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
@ -46,7 +46,7 @@ import com.tommytony.war.spout.SpoutMessenger;
|
|||||||
* @author tommytony, Tim Düsterhus
|
* @author tommytony, Tim Düsterhus
|
||||||
* @package bukkit.tommytony.war
|
* @package bukkit.tommytony.war
|
||||||
*/
|
*/
|
||||||
public class WarPlayerListener extends PlayerListener {
|
public class WarPlayerListener implements Listener {
|
||||||
private java.util.Random random = new java.util.Random();
|
private java.util.Random random = new java.util.Random();
|
||||||
private HashMap<String, Location> latestLocations = new HashMap<String, Location>();
|
private HashMap<String, Location> latestLocations = new HashMap<String, Location>();
|
||||||
|
|
||||||
@ -55,8 +55,8 @@ public class WarPlayerListener extends PlayerListener {
|
|||||||
*
|
*
|
||||||
* @see PlayerListener.onPlayerQuit()
|
* @see PlayerListener.onPlayerQuit()
|
||||||
*/
|
*/
|
||||||
@Override
|
@EventHandler(event = PlayerQuitEvent.class)
|
||||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
public void onPlayerQuit(final PlayerQuitEvent event) {
|
||||||
if (War.war.isLoaded()) {
|
if (War.war.isLoaded()) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
Warzone zone = Warzone.getZoneByPlayerName(player.getName());
|
Warzone zone = Warzone.getZoneByPlayerName(player.getName());
|
||||||
@ -70,8 +70,8 @@ public class WarPlayerListener extends PlayerListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = PlayerDropItemEvent.class)
|
||||||
public void onPlayerDropItem(PlayerDropItemEvent event) {
|
public void onPlayerDropItem(final PlayerDropItemEvent event) {
|
||||||
if (War.war.isLoaded()) {
|
if (War.war.isLoaded()) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
Team team = Team.getTeamByPlayerName(player.getName());
|
Team team = Team.getTeamByPlayerName(player.getName());
|
||||||
@ -132,8 +132,8 @@ public class WarPlayerListener extends PlayerListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = PlayerPickupItemEvent.class)
|
||||||
public void onPlayerPickupItem(PlayerPickupItemEvent event) {
|
public void onPlayerPickupItem(final PlayerPickupItemEvent event) {
|
||||||
if (War.war.isLoaded()) {
|
if (War.war.isLoaded()) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
Team team = Team.getTeamByPlayerName(player.getName());
|
Team team = Team.getTeamByPlayerName(player.getName());
|
||||||
@ -161,8 +161,8 @@ public class WarPlayerListener extends PlayerListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = PlayerInventoryEvent.class)
|
||||||
public void onInventoryOpen(PlayerInventoryEvent event) {
|
public void onInventoryOpen(final PlayerInventoryEvent event) {
|
||||||
if (War.war.isLoaded()) {
|
if (War.war.isLoaded()) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
Inventory inventory = event.getInventory();
|
Inventory inventory = event.getInventory();
|
||||||
@ -181,8 +181,8 @@ public class WarPlayerListener extends PlayerListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = PlayerCommandPreprocessEvent.class)
|
||||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
public void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event) {
|
||||||
if (War.war.isLoaded()) {
|
if (War.war.isLoaded()) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
Team talkingPlayerTeam = Team.getTeamByPlayerName(player.getName());
|
Team talkingPlayerTeam = Team.getTeamByPlayerName(player.getName());
|
||||||
@ -207,8 +207,8 @@ public class WarPlayerListener extends PlayerListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = PlayerKickEvent.class)
|
||||||
public void onPlayerKick(PlayerKickEvent event) {
|
public void onPlayerKick(final PlayerKickEvent event) {
|
||||||
if (War.war.isLoaded()) {
|
if (War.war.isLoaded()) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
String reason = event.getReason();
|
String reason = event.getReason();
|
||||||
@ -227,7 +227,7 @@ public class WarPlayerListener extends PlayerListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = PlayerInteractEvent.class)
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
if (War.war.isLoaded()) {
|
if (War.war.isLoaded()) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
@ -264,8 +264,8 @@ public class WarPlayerListener extends PlayerListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = PlayerMoveEvent.class)
|
||||||
public void onPlayerMove(PlayerMoveEvent event) {
|
public void onPlayerMove(final PlayerMoveEvent event) {
|
||||||
if (!War.war.isLoaded()) {
|
if (!War.war.isLoaded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -722,7 +722,7 @@ public class WarPlayerListener extends PlayerListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@EventHandler(event = PlayerToggleSneakEvent.class)
|
||||||
public void onPlayerToggleSneak(PlayerToggleSneakEvent event) {
|
public void onPlayerToggleSneak(PlayerToggleSneakEvent event) {
|
||||||
if (War.war.isLoaded() && event.isSneaking()) {
|
if (War.war.isLoaded() && event.isSneaking()) {
|
||||||
Warzone playerWarzone = Warzone.getZoneByLocation(event.getPlayer());
|
Warzone playerWarzone = Warzone.getZoneByLocation(event.getPlayer());
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
package bukkit.tommytony.war;
|
package bukkit.tommytony.war;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.server.PluginDisableEvent;
|
import org.bukkit.event.server.PluginDisableEvent;
|
||||||
import org.bukkit.event.server.ServerListener;
|
|
||||||
import org.getspout.spoutapi.SpoutManager;
|
import org.getspout.spoutapi.SpoutManager;
|
||||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||||
|
|
||||||
public class WarServerListener extends ServerListener {
|
public class WarServerListener implements Listener {
|
||||||
|
|
||||||
public void onPluginDisable(PluginDisableEvent event) {
|
@EventHandler(event = PluginDisableEvent.class)
|
||||||
|
public void onPluginDisable(final PluginDisableEvent event) {
|
||||||
if (event.getPlugin().getDataFolder().getName().equals("Spout")) {
|
if (event.getPlugin().getDataFolder().getName().equals("Spout")) {
|
||||||
if (War.war.isSpoutServer()) {
|
if (War.war.isSpoutServer()) {
|
||||||
for (Player player : War.war.getServer().getOnlinePlayers()) {
|
for (Player player : War.war.getServer().getOnlinePlayers()) {
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
package bukkit.tommytony.war;
|
|
||||||
|
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
import org.getspout.spoutapi.event.spout.SpoutCraftEnableEvent;
|
|
||||||
import org.getspout.spoutapi.event.spout.SpoutListener;
|
|
||||||
|
|
||||||
public class WarSpoutListener extends SpoutListener {
|
|
||||||
static Plugin plugin;
|
|
||||||
|
|
||||||
public WarSpoutListener(Plugin plugin) {
|
|
||||||
WarSpoutListener.plugin = plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSpoutCraftEnable(SpoutCraftEnableEvent event) {
|
|
||||||
if(!event.getPlayer().isSpoutCraftEnabled()) {
|
|
||||||
//event.getPlayer().sendMessage("PROTIP: Get Spout at getspout.org for real-time scores display!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,7 +6,6 @@ import org.bukkit.entity.Player;
|
|||||||
import bukkit.tommytony.war.WarCommandHandler;
|
import bukkit.tommytony.war.WarCommandHandler;
|
||||||
|
|
||||||
import com.tommytony.war.Bomb;
|
import com.tommytony.war.Bomb;
|
||||||
import com.tommytony.war.Monument;
|
|
||||||
import com.tommytony.war.Warzone;
|
import com.tommytony.war.Warzone;
|
||||||
import com.tommytony.war.ZoneLobby;
|
import com.tommytony.war.ZoneLobby;
|
||||||
import com.tommytony.war.mappers.WarzoneYmlMapper;
|
import com.tommytony.war.mappers.WarzoneYmlMapper;
|
||||||
|
@ -5,7 +5,6 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.material.MaterialData;
|
|
||||||
|
|
||||||
import com.tommytony.war.volumes.Volume;
|
import com.tommytony.war.volumes.Volume;
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ import org.getspout.spoutapi.SpoutManager;
|
|||||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||||
|
|
||||||
import bukkit.tommytony.war.War;
|
import bukkit.tommytony.war.War;
|
||||||
import bukkit.tommytony.war.WarSpoutListener;
|
|
||||||
|
|
||||||
import com.tommytony.war.config.InventoryBag;
|
import com.tommytony.war.config.InventoryBag;
|
||||||
import com.tommytony.war.config.TeamConfig;
|
import com.tommytony.war.config.TeamConfig;
|
||||||
|
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -25,7 +24,6 @@ import org.getspout.spoutapi.SpoutManager;
|
|||||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||||
|
|
||||||
import bukkit.tommytony.war.War;
|
import bukkit.tommytony.war.War;
|
||||||
import bukkit.tommytony.war.WarSpoutListener;
|
|
||||||
|
|
||||||
import com.tommytony.war.config.InventoryBag;
|
import com.tommytony.war.config.InventoryBag;
|
||||||
import com.tommytony.war.config.TeamConfig;
|
import com.tommytony.war.config.TeamConfig;
|
||||||
|
@ -8,7 +8,6 @@ import org.getspout.spoutapi.SpoutManager;
|
|||||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||||
|
|
||||||
import bukkit.tommytony.war.War;
|
import bukkit.tommytony.war.War;
|
||||||
import bukkit.tommytony.war.WarSpoutListener;
|
|
||||||
|
|
||||||
import com.tommytony.war.Team;
|
import com.tommytony.war.Team;
|
||||||
import com.tommytony.war.Warzone;
|
import com.tommytony.war.Warzone;
|
||||||
|
@ -1,309 +0,0 @@
|
|||||||
name: War
|
|
||||||
version: 1.7-PREVIEW (Doolittle)
|
|
||||||
description: Lets you create TDM and CTF arenas (warzones) for a fast-paced and structured PVP experience.
|
|
||||||
author: tommytony
|
|
||||||
website: war.tommytony.com
|
|
||||||
main: bukkit.tommytony.war.War
|
|
||||||
softdepend: [Spout]
|
|
||||||
permissions:
|
|
||||||
war.*:
|
|
||||||
description: Full War permissions. Create and destroy warzones. Change War configuration.
|
|
||||||
default: op
|
|
||||||
children:
|
|
||||||
war.admin: true
|
|
||||||
war.zonemaker: true
|
|
||||||
war.player: true
|
|
||||||
war.warp: true
|
|
||||||
war.build: true
|
|
||||||
war.pvp: true
|
|
||||||
war.admin:
|
|
||||||
description: War admin rights. Create and destroy warzones. Change War configuration.
|
|
||||||
default: false
|
|
||||||
children:
|
|
||||||
war.zonemaker: true
|
|
||||||
war.player: true
|
|
||||||
war.build: true
|
|
||||||
war.zonemaker:
|
|
||||||
description: Warzone maker rights. Create and edit warzones, but you can only edit a warzone if you are its author.
|
|
||||||
default: false
|
|
||||||
children:
|
|
||||||
war.player: true
|
|
||||||
war.build: true
|
|
||||||
war.player:
|
|
||||||
description: Lets you participate in War matches.
|
|
||||||
default: true
|
|
||||||
war.warp:
|
|
||||||
description: Gives you access the /zone and /warhub commands that let you teleport to all warzones.
|
|
||||||
default: true
|
|
||||||
war.build:
|
|
||||||
description:
|
|
||||||
Useful only after using /warcfg buildinzonesonly:true. This node circumvents the build restriction and lets you build outside warzones.
|
|
||||||
Give war.build to people that you consider worthy of having build rights.
|
|
||||||
default: false
|
|
||||||
war.pvp:
|
|
||||||
description:
|
|
||||||
Useful only after using /warcfg pvpinzonesonly:true. This node circumvents the pvp restriction and lets you pvp outside warzones.
|
|
||||||
To setup a pvp world, give war.pvp to players, but only as a permission specific to the pvp world. Other worlds will remain protected
|
|
||||||
by the pvpinzonesonly setting. NOTE - No matter what, pvp must be turned on in your server.properties file, otherwise War won't work.
|
|
||||||
default: false
|
|
||||||
commands:
|
|
||||||
# Player commands
|
|
||||||
warzones:
|
|
||||||
description: War> Lists the warzones on the server. Each warzone is an independent arena.
|
|
||||||
usage: Lists the warzones on the server. Each warzone is an independent arena.
|
|
||||||
Ex - /warzones
|
|
||||||
zones:
|
|
||||||
description: War> Shortcut for /warzones.
|
|
||||||
usage: Lists the warzones on the server. Each warzone is an independent arena.
|
|
||||||
Ex - /zones
|
|
||||||
warzone:
|
|
||||||
description: War> Teleports you to the specified warzone's lobby.
|
|
||||||
usage: Teleports you to the specified warzone's lobby.
|
|
||||||
Ex - /warzone <zone-name>
|
|
||||||
zone:
|
|
||||||
description: War> Shortcut for /warzone.
|
|
||||||
usage: Teleports you to the specified warzone's lobby.
|
|
||||||
Ex - /zone <zone-name>
|
|
||||||
warhub:
|
|
||||||
description: War> Teleports you to the warhub, if it exists. The warhub offers portals to reach each warzone on the server.
|
|
||||||
usage: Teleports you to the warhub, if it exists.
|
|
||||||
Ex - /warhub
|
|
||||||
teams:
|
|
||||||
description: War> Lists the teams in the warzone.
|
|
||||||
usage: Lists the teams in the warzone. Use zone name when outside warzone.
|
|
||||||
Ex - /teams [zone-name]
|
|
||||||
join:
|
|
||||||
description: War> Use to change teams. Also used instead of walking in the team gate in the lobby.
|
|
||||||
usage: Use to change teams. Also used instead of walking in the team gate in the lobby. Must be standing in warzone or lobby.
|
|
||||||
Ex - /join <team-color>
|
|
||||||
leave:
|
|
||||||
description: War> Use to leave a warzone. Teleports you back to the lobby.
|
|
||||||
usage: Use to leave a warzone. Teleports you back to the lobby. Must be in team already.
|
|
||||||
Ex - /leave
|
|
||||||
team:
|
|
||||||
description: War> Team chat.
|
|
||||||
usage: Team chat.
|
|
||||||
Ex - /team <message>
|
|
||||||
# Warzone maker commands (must have the 'war.zonemaker' permission or be added as a zone-maker in /plugins/War/war.txt)
|
|
||||||
# Battle-related commands
|
|
||||||
nextbattle:
|
|
||||||
description: War> Warzone blocks are restored, teams are respawned but score remains unaffected. All zone-makers can do this, even if they are not an author of the zone.
|
|
||||||
usage: Warzone blocks are restored, teams are respawned but score remains unaffected. All zone-makers can do this, even if they are not an author of the zone. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex - /nextbattle [zone-name]
|
|
||||||
# Warzone creation commands
|
|
||||||
setzone:
|
|
||||||
description: War> Use to create a warzone. Lobby is created and blocks are saved when the second corner is set. You can only edit zones you create or those listing you as author (add authors with /zonecfg author:yourname).
|
|
||||||
usage: Use to create a warzone. Lobby is created and blocks are saved when the second corner is set. You can only edit zones you create or those listing you as author (add authors with /zonecfg author:yourname). Warzones must be at least 10 blocks wide in all directions.
|
|
||||||
Ex -
|
|
||||||
==Wand Cuboid mode==>
|
|
||||||
1) /setzone <zone-name> to get wooden sword,
|
|
||||||
2) Left-click to select or move corner1,
|
|
||||||
3) Right-click to select or move corner2.
|
|
||||||
Turn off wand by dropping the wooden sword.
|
|
||||||
==Wandless Cuboid mode==>
|
|
||||||
/setzone <zone-name> <corner1/corner2/c1/c2/pos1/pos2>
|
|
||||||
savezone:
|
|
||||||
description: War> Persists changes made to the warzone since the last save. Config can be set with named parameters.
|
|
||||||
usage: Persists changes made to the warzone since the last save. Config can be set with named parameters. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/savezone [zone-name] => Basic save - name optional if standing inside,
|
|
||||||
/savezone [zone-name] lifepool:8 teamsize:5 maxscore:7 autoassign:on ff:on blockheads:on spawnstyle:<big/flat/small/invisible> unbreakable:on nocreatures:on disabled:on monumentheal:<0-20>
|
|
||||||
flagreturn:<both/spawn/flag> flagpointsonly:false glasswalls:on pvpinzone:true instabreak:false nodrops:false nohunger:false saturation:<0-20> minplayers:1 minteams:1
|
|
||||||
/savezone [zone-name] loadout:default => sets the respawn inventory to your current items,
|
|
||||||
/savezone [zone-name] loadout:<extra-loadout-name> => adds an extra loadout (i.e. another player class) that the players can toggle to by sneaking while inside the spawn
|
|
||||||
/savezone [zone-name] deleteloadout:<extra-loadout-name> => removed the specified loadout from the choices. You cannot remove the default loadout.
|
|
||||||
/savezone [zone-name] reward:default => sets the winner's reward to your current items.
|
|
||||||
/savezone [zone-name] author:tommytony,someguy => adds these players as authors of the warzone, allowing them to edit it.
|
|
||||||
/savezone [zone-name] deleteauthor:tommytony,someguy => removes these players from the warzone authors.
|
|
||||||
setzonelobby:
|
|
||||||
description: War> Creates or changes the position of the warzone lobby.
|
|
||||||
usage: Creates or changes the position of the warzone lobby.
|
|
||||||
Ex -
|
|
||||||
==Attached lobby==>
|
|
||||||
Must be standing in warzone or lobby.
|
|
||||||
/setzonelobby <north/east/south/west/n/e/s/w>
|
|
||||||
==Detached lobby==>
|
|
||||||
Must be standing outside warzone or lobby.
|
|
||||||
/setzonelobby <zone-name>
|
|
||||||
setteam:
|
|
||||||
description: War> Creates or moves a team spawn. The lobby is updated.
|
|
||||||
usage: Creates or moves a team spawn. The lobby is updated. Must be standing in warzone.
|
|
||||||
Ex -
|
|
||||||
/setteam <diamond/iron/gold/white/orange/magenta/blue/green/pink/gray/purple/navy/brown/darkgreen/red/black>
|
|
||||||
setmonument:
|
|
||||||
description: War> Creates or moves a monument. Monuments can be capture with wool from your team and give your health.
|
|
||||||
usage: Creates or moves a monument. Monuments can be capture with wool from your team and give your health. Must be standing in warzone.
|
|
||||||
Ex -
|
|
||||||
/setmonument <monument-name>
|
|
||||||
setteamflag:
|
|
||||||
description: War> Creates/moves a team flag post for CTF.
|
|
||||||
usage: Creates/moves a team flag post for CTF. Must be standing in warzone.
|
|
||||||
Ex -
|
|
||||||
/setteamflag <team-color>
|
|
||||||
setbomb:
|
|
||||||
description: War> Creates or moves a bomb. Get the bomb to the other team's spawn. People from other teams can blow you up.
|
|
||||||
usage: Creates or moves a bomb. Get the bomb to the other team's spawn. People from other teams can blow you up. Must be standing in warzone.
|
|
||||||
Ex -
|
|
||||||
/setbomb <bomb-name>
|
|
||||||
setcake:
|
|
||||||
description: War> Creates or moves a cake. Get the cake to your spawn to score a replenish your lifepool.
|
|
||||||
usage: Creates or moves a bomb. Get the cake to your spawn to score a replenish your lifepool. Must be standing in warzone.
|
|
||||||
Ex -
|
|
||||||
/setcake <cake-name>
|
|
||||||
resetzone:
|
|
||||||
description: War> Reloads zone blocks from disk. Everyone is teleported back to the lobby.
|
|
||||||
usage: Reloads zone blocks from disk. Everyone is teleported back to the lobby. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/resetzone [zone-name]
|
|
||||||
deletezone:
|
|
||||||
description: War> Deletes the zone, resets all blocks.
|
|
||||||
usage: Deletes the zone after resetting all blocks. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/deletezone [zone-name]
|
|
||||||
renamezone:
|
|
||||||
description: War> Renames the zone
|
|
||||||
usage: Renames the zone. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/renamezone [zone-name] <new-name>
|
|
||||||
deleteteam:
|
|
||||||
description: War> Deletes the team. Team must exist.
|
|
||||||
usage: Deletes the team. Team must exist. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/deleteteam [zone-name] <team-color>
|
|
||||||
deleteteamflag:
|
|
||||||
description: War> Deletes the specified team's flag. Team and flag must exist.
|
|
||||||
usage: Deletes the specified team's flag. Team and flag must exist. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/deleteteamflag [zone-name] <team-color>
|
|
||||||
deletemonument:
|
|
||||||
description: War> Deletes the monument.
|
|
||||||
usage: Deletes the monument. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/deletemonument [zone-name] <monument-name>
|
|
||||||
deletebomb:
|
|
||||||
description: War> Deletes the bomb.
|
|
||||||
usage: Deletes the bomb. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/deletebomb [zone-name] <bomb-name>
|
|
||||||
deletecake:
|
|
||||||
description: War> Deletes the cake.
|
|
||||||
usage: Deletes the cake. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/deletecake [zone-name] <cake-name>
|
|
||||||
setzoneconfig:
|
|
||||||
description: War> Use named parameters to change the configuration of the warzone. Resets blocks like /nextbattle. Does not save zone blocks like /savezone.
|
|
||||||
usage: Use named parameters to change the configuration of the warzone. Resets blocks like /nextbattle. Does not save zone blocks like /savezone. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/setzoneconfig [zone-name] lifepool:8 teamsize:5 maxscore:7 autoassign:on ff:on blockheads:on spawnstyle:<big/flat/small/invisible> unbreakable:on nocreatures:on disabled:on monumentheal:<0-20>
|
|
||||||
flagreturn:<both/spawn/flag> flagpointsonly:false glasswalls:on pvpinzone:true instabreak:false nodrops:false nohunger:false saturation:<0-20> minplayers:1 minteams:1
|
|
||||||
/setzoneconfig [zone-name] loadout:default => sets the respawn inventory to your current items,
|
|
||||||
/setzoneconfig [zone-name] loadout:<extra-loadout-name> => adds an extra loadout (i.e. another player class) that the players can toggle to by sneaking while inside the spawn
|
|
||||||
/setzoneconfig [zone-name] deleteloadout:<extra-loadout-name> => removed the specified loadout from the choices. You cannot remove the default loadout.
|
|
||||||
/setzoneconfig [zone-name] reward:default => sets the winner's reward to your current items.
|
|
||||||
/setzoneconfig [zone-name] author:tommytony,someguy => adds these players as authors of the warzone, allowing them to edit it.
|
|
||||||
/setzoneconfig [zone-name] deleteauthor:tommytony,someguy => removes these players from the warzone authors.
|
|
||||||
zonecfg:
|
|
||||||
description: War> Alias for /setzoneconfig
|
|
||||||
usage: Use named parameters to change the configuration of the warzone and default team settings. Resets blocks like /nextbattle. Does not save zone blocks like /savezone. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/zonecfg [zone-name] lifepool:8 teamsize:5 maxscore:7 autoassign:on ff:on blockheads:on spawnstyle:<big/flat/small/invisible> unbreakable:on nocreatures:on disabled:on monumentheal:<0-20>
|
|
||||||
flagreturn:<both/spawn/flag> flagpointsonly:false glasswalls:on pvpinzone:true instabreak:false nodrops:false nohunger:false saturation:<0-20> minplayers:1 minteams:1
|
|
||||||
/zonecfg [zone-name] loadout:default => sets the respawn inventory to your current items,
|
|
||||||
/zonecfg [zone-name] loadout:<extra-loadout-name> => adds an extra loadout (i.e. another player class) that the players can toggle to by sneaking while inside the spawn
|
|
||||||
/zonecfg [zone-name] deleteloadout:<extra-loadout-name> => removed the specified loadout from the choices. You cannot remove the default loadout.
|
|
||||||
/zonecfg [zone-name] reward:default => sets the winner's reward to your current items.
|
|
||||||
/zonecfg [zone-name] author:tommytony,someguy => adds these players as authors of the warzone, allowing them to edit it.
|
|
||||||
/zonecfg [zone-name] deleteauthor:tommytony,someguy => removes these players from the warzone authors.
|
|
||||||
setteamconfig:
|
|
||||||
description: War> Use named parameters to change team-specific settings. Resets warzone blocks like /nextbattle. Does not save zone blocks like /savezone.
|
|
||||||
usage: Use named parameters to change the configuration of the warzone. Resets blocks like /nextbattle. Does not save zone blocks like /savezone. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/setteamconfig [zone-name] <team-name> lifepool:8 teamsize:5 maxscore:7 autoassign:on ff:on blockheads:on spawnstyle:<big/flat/small/invisible>
|
|
||||||
flagreturn:<both/spawn/flag> flagpointsonly:false nohunger:false saturation:<0-20>
|
|
||||||
/setteamconfig [zone-name] <team-name> loadout:default => sets the respawn inventory to your current items,
|
|
||||||
/setteamconfig [zone-name] <team-name> loadout:<extra-loadout-name> => adds an extra loadout (i.e. another player class) that the players can toggle to by sneaking while inside the spawn
|
|
||||||
/setteamconfig [zone-name] <team-name> deleteloadout:<extra-loadout-name> => removed the specified loadout from the choices. You cannot remove the default loadout.
|
|
||||||
/setteamconfig [zone-name] <team-name> reward:default => sets the winner's reward to your current items.
|
|
||||||
teamcfg:
|
|
||||||
description: War> Alias for /setteamconfig
|
|
||||||
usage: Use named parameters to change the team-specific settings. Resets warzone blocks like /nextbattle. Does not save zone blocks like /savezone. Provide a zone name if not standing in warzone or lobby.
|
|
||||||
Ex -
|
|
||||||
/teamcfg [zone-name] <team-name> lifepool:8 teamsize:5 maxscore:7 spawnstyle:<big/flat/small/invisible> unbreakable:on nocreatures:on disabled:on monumentheal:<0-20>
|
|
||||||
flagreturn:<both/spawn/flag> flagpointsonly:false nohunger:false saturation:<0-20>
|
|
||||||
/teamcfg [zone-name] <team-name> loadout:default => sets the respawn inventory to your current items,
|
|
||||||
/teamcfg [zone-name] <team-name> loadout:<extra-loadout-name> => adds an extra loadout (i.e. another player class) that the players can toggle to by sneaking while inside the spawn
|
|
||||||
/teamcfg [zone-name] <team-name> deleteloadout:<extra-loadout-name> => removed the specified loadout from the choices. You cannot remove the default loadout.
|
|
||||||
/teamcfg [zone-name] <team-name> reward:default => sets the winner's reward to your current items.
|
|
||||||
zonemaker:
|
|
||||||
description: War> Toggles between player mode and zone maker mode. Or gives/removes access to zonemaker commands for another player.
|
|
||||||
usage: Toggles between player mode and zone maker mode. Or gives/removes access to zonemaker commands for another player.
|
|
||||||
Ex -
|
|
||||||
/zonemaker
|
|
||||||
/zonemaker <new-or-kicked-zone-maker-name>
|
|
||||||
zm:
|
|
||||||
description: War> Alias for /zonemaker
|
|
||||||
usage: Toggles between player mode and zone maker mode. Or gives/removes access to zonemaker commands for another player.
|
|
||||||
Ex -
|
|
||||||
/zonemaker
|
|
||||||
/zonemaker <new-or-kicked-zone-maker-name>
|
|
||||||
# War admin commands (must have the 'war.*' permission or be an op)
|
|
||||||
# War hub
|
|
||||||
setwarhub:
|
|
||||||
description: War> Create or moves a wall of portals. One portal per warzone. Warzones get a portal back to the warhub.
|
|
||||||
usage: Create or moves a wall of portals. One portal per warzone. Warzones get a portal back to the warhub.
|
|
||||||
Ex -
|
|
||||||
/setwarhub
|
|
||||||
deletewarhub:
|
|
||||||
description: War> Deletes the warhub if it exists. Resets all warzone lobbies.
|
|
||||||
usage: Deletes the warhub if it exists. Resets all warzone lobbies.
|
|
||||||
Ex -
|
|
||||||
/deletewarhub
|
|
||||||
# Defaults and server configuration
|
|
||||||
unloadwar:
|
|
||||||
description: War> Disables the War plugin.
|
|
||||||
usage: Disables the War plugin.
|
|
||||||
Ex -
|
|
||||||
/unloadwar
|
|
||||||
loadwar:
|
|
||||||
description: War> Enables the War plugin.
|
|
||||||
usage: Enables the War plugin.
|
|
||||||
Ex -
|
|
||||||
/loadwar
|
|
||||||
setwarconfig:
|
|
||||||
description: War> Change gobal settings and the default warzone configuration values.
|
|
||||||
usage: Change global settings and the default warzone and team configuration values.
|
|
||||||
Ex -
|
|
||||||
/setwarconfig pvpinzonesonly:on buildinzonesonly:on disablepvpmessage:off tntinzonesonly:off maxzones:12 => Global settings,
|
|
||||||
/setwarconfig lifepool:8 teamsize:5 maxscore:7 autoassign:on ff:on blockheads:on spawnstyle:<big/flat/small/invisible> unbreakable:on nocreatures:on disabled:on monumentheal:<0-20>
|
|
||||||
flagreturn:<both/spawn/flag> flagpointsonly:false glasswalls:on pvpinzone:true instabreak:false nodrops:false nohunger:false saturation:<0-20> minplayers:1 minteams:1
|
|
||||||
=> Warzone defaults,
|
|
||||||
/setwarconfig loadout:default => sets the respawn inventory to your current items,
|
|
||||||
/setwarconfig loadout:<extra-loadout-name> => adds an extra loadout (i.e. another player class) that the players can toggle to by sneaking while inside the spawn
|
|
||||||
/setwarconfig deleteloadout:<extra-loadout-name> => removed teh specified loadout from the choices. You cannot remove the default loadout.
|
|
||||||
/setwarconfig reward:default => sets the winner's reward to your current items.
|
|
||||||
/setwarconfig rallypoint:<warzone-name> => changes when players get teleported at the end of a match for that zone, useful for chaining warzones together in a sequence, or preventing players from rejoining immediately
|
|
||||||
warcfg:
|
|
||||||
description: War> Alias for /setwarconfig
|
|
||||||
usage: Change global settings and the default warzone and team configuration values.
|
|
||||||
Ex -
|
|
||||||
/warcfg pvpinzonesonly:on buildinzonesonly:on disablepvpmessage:off tntinzonesonly:off maxzones:12 => Global settings,
|
|
||||||
/warcfg lifepool:8 teamsize:5 maxscore:7 autoassign:on ff:on blockheads:on spawnstyle:<big/flat/small/invisible> unbreakable:on nocreatures:on disabled:on monumentheal:<0-20>
|
|
||||||
flagreturn:<both/spawn/flag> flagpointsonly:false glasswalls:on pvpinzone:true instabreak:false nodrops:false nohunger:false saturation:<0-20> minplayers:1 minteams:1
|
|
||||||
=> Warzone defaults,
|
|
||||||
/warcfg loadout:default => sets the respawn inventory to your current items,
|
|
||||||
/warcfg loadout:<extra-loadout-name> => adds an extra loadout (i.e. another player class) that the players can toggle to by sneaking while inside the spawn
|
|
||||||
/warcfg deleteloadout:<extra-loadout-name> => removed teh specified loadout from the choices. You cannot remove the default loadout.
|
|
||||||
/warcfg reward:default => sets the winner's reward to your current items.
|
|
||||||
/warcfg rallypoint:<warzone-name> => changes when players get teleported at the end of a match for that zone, useful for chaining warzones together in a sequence, or preventing players from rejoining immediately
|
|
||||||
# Fallback
|
|
||||||
war:
|
|
||||||
description: War> Short War help. Can also be used as a prefix for all War commands as a fallback if they conflict with other plugins.
|
|
||||||
usage: War is on. Please pick your battle. Try /warhub, /zones and /zone. Further instructions at war.tommytony.com/instructions.
|
|
||||||
The /war command can be used as a prefix to all other command as a fallback if they conflict with other plugins. Ex -
|
|
||||||
/war,
|
|
||||||
/war setzone <zone-name>,
|
|
||||||
/war warhub,
|
|
||||||
/war zone <zone-name>
|
|
||||||
War:
|
|
||||||
description: War> Same as /war. Used as fallback.
|
|
||||||
usage: See /war.
|
|
Loading…
Reference in New Issue
Block a user