mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2024-11-21 18:15:51 +01:00
Added the ability to set what the command is. Also added a .gitignore.
This commit is contained in:
parent
98663e4a0e
commit
6c37f50879
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
.idea/
|
||||
*.iml
|
||||
bin/
|
||||
*.class
|
@ -52,6 +52,17 @@ public class AISettings implements DataObject, WorldSettings {
|
||||
@ConfigEntry(path = "acid.damage-chickens")
|
||||
private boolean acidDamageChickens = false;
|
||||
|
||||
// Command
|
||||
@ConfigComment("")
|
||||
@ConfigComment("Island Command. What command users will run to access their island")
|
||||
@ConfigEntry(path = "acid.command.island")
|
||||
private String islandCommand = "ai";
|
||||
|
||||
@ConfigComment("")
|
||||
@ConfigComment("The island admin command.")
|
||||
@ConfigEntry(path = "acid.command.admin")
|
||||
private String adminCommand = "acid";
|
||||
|
||||
// Damage
|
||||
@ConfigComment("Damage that a player will experience in acid. 10 is half their health typically. 5 would be easier.")
|
||||
@ConfigEntry(path = "acid.damage.acid.player")
|
||||
@ -1305,4 +1316,22 @@ public class AISettings implements DataObject, WorldSettings {
|
||||
this.defaultBiome = defaultBiome;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the command for accessing your island
|
||||
*/
|
||||
public String getIslandCommand() { return islandCommand; }
|
||||
|
||||
/**
|
||||
* @param islandCommand what you want your island command to be
|
||||
*/
|
||||
public void setIslandCommand(String islandCommand) { this.islandCommand = islandCommand; }
|
||||
/**
|
||||
* @return the command for accessing your admin command
|
||||
*/
|
||||
public String getAdminCommand() { return adminCommand; }
|
||||
|
||||
/**
|
||||
* @param adminCommand what you want your admin command to be
|
||||
*/
|
||||
public void setAdminCommand(String adminCommand) { this.adminCommand = adminCommand; }
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ public class AcidIsland extends Addon {
|
||||
manager.registerEvents(new AcidEffect(this), this.getPlugin());
|
||||
manager.registerEvents(new LavaCheck(this), this.getPlugin());
|
||||
// Register commands
|
||||
new AcidCommand(this);
|
||||
new AiCommand(this);
|
||||
new AcidCommand(this, settings.getAdminCommand());
|
||||
new AiCommand(this, settings.getIslandCommand());
|
||||
// Burn everything
|
||||
acidTask = new AcidTask(this);
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
public class AcidCommand extends CompositeCommand {
|
||||
|
||||
public AcidCommand(Addon addon) {
|
||||
super(addon, "acid");
|
||||
public AcidCommand(Addon addon, String command) {
|
||||
super(addon, command);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -26,8 +26,8 @@ import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
public class AiCommand extends CompositeCommand {
|
||||
|
||||
public AiCommand(Addon addon) {
|
||||
super(addon, "ai");
|
||||
public AiCommand(Addon addon, String command) {
|
||||
super(addon, command);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
Loading…
Reference in New Issue
Block a user