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:
@@ -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
|
||||
|
@@ -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(
|
||||
{
|
||||
|
15
Essentials/src/net/ess3/settings/commands/Near.java
Normal file
15
Essentials/src/net/ess3/settings/commands/Near.java
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user