mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-26 12:16:24 +01:00
* commit forgotten files
This commit is contained in:
parent
516a98c970
commit
a709e9c7b3
33
src/org/mcteam/factions/commands/FCommandLock.java
Normal file
33
src/org/mcteam/factions/commands/FCommandLock.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package org.mcteam.factions.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.mcteam.factions.Factions;
|
||||||
|
|
||||||
|
public class FCommandLock extends FBaseCommand {
|
||||||
|
|
||||||
|
public FCommandLock() {
|
||||||
|
aliases.add("lock");
|
||||||
|
|
||||||
|
optionalParameters.add("on|off");
|
||||||
|
|
||||||
|
helpDescription = "lock all write stuff";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasPermission(CommandSender sender) {
|
||||||
|
return Factions.hasPermLock(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void perform() {
|
||||||
|
if( parameters.size() > 0 ) {
|
||||||
|
setLock( parseBool( parameters.get(0) ));
|
||||||
|
} else {
|
||||||
|
if( isLocked() ) {
|
||||||
|
me.sendMessage("Factions is locked");
|
||||||
|
} else {
|
||||||
|
me.sendMessage("Factions is not locked");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
38
src/org/mcteam/factions/commands/FCommandReload.java
Normal file
38
src/org/mcteam/factions/commands/FCommandReload.java
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
package org.mcteam.factions.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.mcteam.factions.Board;
|
||||||
|
import org.mcteam.factions.Conf;
|
||||||
|
import org.mcteam.factions.FPlayer;
|
||||||
|
import org.mcteam.factions.Faction;
|
||||||
|
import org.mcteam.factions.Factions;
|
||||||
|
|
||||||
|
public class FCommandReload extends FBaseCommand {
|
||||||
|
|
||||||
|
public FCommandReload() {
|
||||||
|
aliases.add("reload");
|
||||||
|
|
||||||
|
helpDescription = "reloads the config";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasPermission(CommandSender sender) {
|
||||||
|
return Factions.hasPermReload(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void perform() {
|
||||||
|
Factions.log("=== RELOAD START ===");
|
||||||
|
long timeInitStart = System.currentTimeMillis();
|
||||||
|
|
||||||
|
Conf.load();
|
||||||
|
FPlayer.load();
|
||||||
|
Faction.load();
|
||||||
|
Board.load();
|
||||||
|
|
||||||
|
long timeReload = (System.currentTimeMillis()-timeInitStart);
|
||||||
|
Factions.log("=== RELOAD DONE (Took "+timeReload+"ms) ===");
|
||||||
|
|
||||||
|
me.sendMessage("FACTIONS RELOAD DONE IN " + timeReload + "ms");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
26
src/org/mcteam/factions/commands/FCommandSaveAll.java
Normal file
26
src/org/mcteam/factions/commands/FCommandSaveAll.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package org.mcteam.factions.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.mcteam.factions.Factions;
|
||||||
|
|
||||||
|
public class FCommandSaveAll extends FBaseCommand {
|
||||||
|
|
||||||
|
public FCommandSaveAll() {
|
||||||
|
aliases.add("saveall");
|
||||||
|
aliases.add("save");
|
||||||
|
|
||||||
|
helpDescription = "save factions to disk";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasPermission(CommandSender sender) {
|
||||||
|
return Factions.hasPermSaveAll(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void perform() {
|
||||||
|
Factions.saveAll();
|
||||||
|
|
||||||
|
me.sendMessage("Factions saved to disk!");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user