Simplify CommandBase's onCommand

Added some TODOs to do
Replaced "dynamic" regex with cached Patterns
This commit is contained in:
Daniil Z committed 2021-03-01 22:24:16 +03:00
1 parent 45f99cacf6
commit 65aa367d98
30 files changed
+122 -106

No files matched your search

@@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
public class SetspawnCommand extends CommandBase {
@Override
protected boolean onCommand(Player p, Command command, String label, String[] args) {
protected void onCommand(Player p, Command command, String label, String[] args) {
if (HuskHomes.getSettings().doSpawnCommand()) {
SettingHandler.setSpawnLocation(p.getLocation());
p.getLocation().getWorld().setSpawnLocation(p.getLocation());
@@ -17,6 +17,5 @@ public class SetspawnCommand extends CommandBase {
} else {
MessageManager.sendMessage(p, "error_command_disabled");
}
return true;
}
}