A bit of cleanup and odds and ends, adding missing @Override annotations and such

This commit is contained in:
Brettflan 2011-06-21 00:38:31 -05:00
parent 60227b6dc4
commit 55dd858be9
32 changed files with 37 additions and 5 deletions

View File

@ -60,6 +60,9 @@ public class FPlayer {
this.lastPowerUpdateTime = System.currentTimeMillis(); this.lastPowerUpdateTime = System.currentTimeMillis();
this.lastLoginTime = System.currentTimeMillis(); this.lastLoginTime = System.currentTimeMillis();
this.mapAutoUpdating = false; this.mapAutoUpdating = false;
this.autoClaimEnabled = false;
this.autoSafeZoneEnabled = false;
this.autoWarZoneEnabled = false;
} }
public void resetFactionData() { public void resetFactionData() {

View File

@ -15,6 +15,7 @@ public class FCommandAdmin extends FBaseCommand {
helpDescription = "Hand over your admin rights"; helpDescription = "Hand over your admin rights";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -9,6 +9,7 @@ public class FCommandChat extends FBaseCommand {
helpDescription = "Switch faction only chat on and off"; helpDescription = "Switch faction only chat on and off";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -8,6 +8,7 @@ public class FCommandClaim extends FBaseCommand {
helpDescription = "Claim the land where you are standing"; helpDescription = "Claim the land where you are standing";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -25,6 +25,7 @@ public class FCommandCreate extends FBaseCommand {
return Factions.hasPermCreate(sender); return Factions.hasPermCreate(sender);
} }
@Override
public void perform() { public void perform() {
if( isLocked() ) { if( isLocked() ) {

View File

@ -16,6 +16,7 @@ public class FCommandDeinvite extends FBaseCommand {
helpDescription = "Remove a pending invitation"; helpDescription = "Remove a pending invitation";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -15,6 +15,7 @@ public class FCommandDescription extends FBaseCommand {
helpDescription = "Change the faction description"; helpDescription = "Change the faction description";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -19,6 +19,7 @@ public class FCommandDisband extends FBaseCommand {
return Factions.hasPermDisband(sender); return Factions.hasPermDisband(sender);
} }
@Override
public void perform() { public void perform() {
if( parameters.size() > 0) { if( parameters.size() > 0) {
Faction faction = Faction.findByTag(parameters.get(0)); Faction faction = Faction.findByTag(parameters.get(0));

View File

@ -3,6 +3,7 @@ package org.mcteam.factions.commands;
import java.util.ArrayList; import java.util.ArrayList;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.mcteam.factions.Conf;
import org.mcteam.factions.util.TextUtil; import org.mcteam.factions.util.TextUtil;
@ -23,6 +24,7 @@ public class FCommandHelp extends FBaseCommand {
return true; return true;
} }
@Override
public void perform() { public void perform() {
int page = 1; int page = 1;
if (parameters.size() > 0) { if (parameters.size() > 0) {
@ -45,7 +47,7 @@ public class FCommandHelp extends FBaseCommand {
// Build the help pages // Build the help pages
//----------------------------------------------// //----------------------------------------------//
public static ArrayList<ArrayList<String>> helpPages; public static final ArrayList<ArrayList<String>> helpPages;
static { static {
helpPages = new ArrayList<ArrayList<String>>(); helpPages = new ArrayList<ArrayList<String>>();
@ -132,7 +134,7 @@ public class FCommandHelp extends FBaseCommand {
pageLines.add( new FCommandWarclaim().getUseageTemplate() ); pageLines.add( new FCommandWarclaim().getUseageTemplate() );
pageLines.add( new FCommandAutoWarclaim().getUseageTemplate() ); pageLines.add( new FCommandAutoWarclaim().getUseageTemplate() );
pageLines.add( new FCommandWarunclaimall().getUseageTemplate() ); pageLines.add( new FCommandWarunclaimall().getUseageTemplate() );
pageLines.add("Note: /f unclaim works on safe/war zones as well."); pageLines.add("Note: " + Conf.colorCommand + "f unclaim" + Conf.colorSystem + " works on safe/war zones as well.");
helpPages.add(pageLines); helpPages.add(pageLines);
pageLines = new ArrayList<String>(); pageLines = new ArrayList<String>();

View File

@ -19,6 +19,7 @@ public class FCommandHome extends FBaseCommand {
helpDescription = "Teleport to the faction home"; helpDescription = "Teleport to the faction home";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -16,6 +16,7 @@ public class FCommandInvite extends FBaseCommand {
helpDescription = "Invite a player"; helpDescription = "Invite a player";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -13,6 +13,7 @@ public class FCommandJoin extends FBaseCommand {
helpDescription = "Join a faction"; helpDescription = "Join a faction";
} }
@Override
public void perform() { public void perform() {
if( isLocked() ) { if( isLocked() ) {

View File

@ -14,6 +14,7 @@ public class FCommandKick extends FBaseCommand {
helpDescription = "Kick a player from the faction"; helpDescription = "Kick a player from the faction";
} }
@Override
public void perform() { public void perform() {
if( isLocked() ) { if( isLocked() ) {

View File

@ -15,6 +15,7 @@ public class FCommandLeave extends FBaseCommand {
return true; return true;
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -26,6 +26,7 @@ public class FCommandList extends FBaseCommand {
return true; return true;
} }
@Override
public void perform() { public void perform() {
ArrayList<Faction> FactionList = new ArrayList<Faction>(Faction.getAll()); ArrayList<Faction> FactionList = new ArrayList<Faction>(Faction.getAll());
FactionList.remove(Faction.getNone()); FactionList.remove(Faction.getNone());

View File

@ -20,6 +20,7 @@ public class FCommandLock extends FBaseCommand {
return Factions.hasPermLock(sender); return Factions.hasPermLock(sender);
} }
@Override
public void perform() { public void perform() {
if( parameters.size() > 0 ) { if( parameters.size() > 0 ) {
setLock( parseBool( parameters.get(0) )); setLock( parseBool( parameters.get(0) ));

View File

@ -20,6 +20,7 @@ public class FCommandMap extends FBaseCommand {
return true; return true;
} }
@Override
public void perform() { public void perform() {
if (parameters.size() > 0) { if (parameters.size() > 0) {
String mapAutoUpdating = parameters.get(0); String mapAutoUpdating = parameters.get(0);

View File

@ -15,6 +15,7 @@ public class FCommandMod extends FBaseCommand {
helpDescription = "Give or revoke moderator rights"; helpDescription = "Give or revoke moderator rights";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -13,6 +13,7 @@ public class FCommandOpen extends FBaseCommand {
helpDescription = "Switch if invitation is required to join"; helpDescription = "Switch if invitation is required to join";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -8,6 +8,7 @@ public class FCommandRelationAlly extends FRelationCommand {
aliases.add("ally"); aliases.add("ally");
} }
@Override
public void perform() { public void perform() {
if( isLocked() ) { if( isLocked() ) {

View File

@ -8,6 +8,7 @@ public class FCommandRelationEnemy extends FRelationCommand {
aliases.add("enemy"); aliases.add("enemy");
} }
@Override
public void perform() { public void perform() {
if( isLocked() ) { if( isLocked() ) {

View File

@ -8,6 +8,7 @@ public class FCommandRelationNeutral extends FRelationCommand {
aliases.add("neutral"); aliases.add("neutral");
} }
@Override
public void perform() { public void perform() {
if( isLocked() ) { if( isLocked() ) {

View File

@ -24,6 +24,7 @@ public class FCommandReload extends FBaseCommand {
return Factions.hasPermReload(sender); return Factions.hasPermReload(sender);
} }
@Override
public void perform() { public void perform() {
Factions.log("=== RELOAD START ==="); Factions.log("=== RELOAD START ===");
long timeInitStart = System.currentTimeMillis(); long timeInitStart = System.currentTimeMillis();

View File

@ -22,6 +22,7 @@ public class FCommandSafeclaim extends FBaseCommand {
return Factions.hasPermManageSafeZone(sender); return Factions.hasPermManageSafeZone(sender);
} }
@Override
public void perform() { public void perform() {
if( isLocked() ) { if( isLocked() ) {

View File

@ -19,6 +19,7 @@ public class FCommandSaveAll extends FBaseCommand {
return Factions.hasPermSaveAll(sender); return Factions.hasPermSaveAll(sender);
} }
@Override
public void perform() { public void perform() {
Factions.saveAll(); Factions.saveAll();

View File

@ -1,9 +1,7 @@
package org.mcteam.factions.commands; package org.mcteam.factions.commands;
import org.mcteam.factions.Board;
import org.mcteam.factions.Conf; import org.mcteam.factions.Conf;
import org.mcteam.factions.Faction; import org.mcteam.factions.Faction;
import org.mcteam.factions.FLocation;
import org.mcteam.factions.struct.Role; import org.mcteam.factions.struct.Role;
public class FCommandSethome extends FBaseCommand { public class FCommandSethome extends FBaseCommand {
@ -14,6 +12,7 @@ public class FCommandSethome extends FBaseCommand {
helpDescription = "Set the faction home"; helpDescription = "Set the faction home";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -27,6 +27,7 @@ public class FCommandShow extends FBaseCommand {
return true; return true;
} }
@Override
public void perform() { public void perform() {
Faction faction; Faction faction;
if (parameters.size() > 0) { if (parameters.size() > 0) {

View File

@ -18,6 +18,7 @@ public class FCommandTag extends FBaseCommand {
helpDescription = "Change the faction tag"; helpDescription = "Change the faction tag";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -17,6 +17,7 @@ public class FCommandTitle extends FBaseCommand {
helpDescription = "Set or remove a players title"; helpDescription = "Set or remove a players title";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -16,6 +16,7 @@ public class FCommandUnclaim extends FBaseCommand {
helpDescription = "Unclaim the land where you are standing"; helpDescription = "Unclaim the land where you are standing";
} }
@Override
public void perform() { public void perform() {
if( isLocked() ) { if( isLocked() ) {

View File

@ -14,6 +14,7 @@ public class FCommandUnclaimall extends FBaseCommand {
helpDescription = "Unclaim all of your factions land"; helpDescription = "Unclaim all of your factions land";
} }
@Override
public void perform() { public void perform() {
if ( ! assertHasFaction()) { if ( ! assertHasFaction()) {
return; return;

View File

@ -19,7 +19,7 @@ public class FCommandVersion extends FBaseCommand {
return true; return true;
} }
@Override
public void perform() { public void perform() {
sendMessage("You are running "+Factions.instance.getDescription().getFullName()); sendMessage("You are running "+Factions.instance.getDescription().getFullName());
} }