1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-31 10:11:46 +02:00

Add config option for /near default radius

This commit is contained in:
snowleo
2012-10-15 23:34:13 +02:00
parent d82899ebd6
commit 80bdae2cc9
3 changed files with 19 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ public class Commandnear extends EssentialsCommand
@Override
protected void run(final IUser user, final String commandLabel, final String[] args) throws Exception
{
long radius = 200;
long radius = ess.getSettings().getData().getCommands().getNear().getDefaultRadius();
IUser otherUser = null;
@@ -63,7 +63,7 @@ public class Commandnear extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
final IUser otherUser = ess.getUserMap().matchUser(args[0], false);
long radius = 200;
long radius = ess.getSettings().getData().getCommands().getNear().getDefaultRadius();
if (args.length > 1)
{
try

View File

@@ -23,10 +23,11 @@ public class Commands implements StorageObject
private Home home = new Home();
private Lightning lightning = new Lightning();
private net.ess3.settings.commands.List list = new net.ess3.settings.commands.List();
private Near near = new Near();
private SocialSpy socalspy = new SocialSpy();
private Spawnmob spawnmob = new Spawnmob();
private Tpa tpa = new Tpa();
private Speed speed = new Speed();
private SocialSpy socalspy = new SocialSpy();
@ListType
@Comment(
{

View File

@@ -0,0 +1,15 @@
package net.ess3.settings.commands;
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.ess3.storage.Comment;
import net.ess3.storage.StorageObject;
@Data
@EqualsAndHashCode(callSuper = false)
public class Near implements StorageObject
{
@Comment("Radius of the near command, if no number is given.")
private int defaultRadius = 200;
}