Skip to content

Commit

Permalink
Implement Limits "offset" command.
Browse files Browse the repository at this point in the history
Offset command have:
- set <player> <material|entity> <number> - sets the specific limit offset for material or entity.
- add <player> <material|entity> <number> - adds the specific limit offset for material or entity.
- remove <player> <material|entity> <number> - removes the specific limit offset for material or entity.
- reset <player> <material|entity> - resets limit offset for material or entity.
- view <player> <material|entity> - views the specific limit offset for material or entity.

Relates to the #149
  • Loading branch information
BONNe committed Mar 28, 2022
1 parent 782150f commit be3554b
Show file tree
Hide file tree
Showing 10 changed files with 729 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/main/java/world/bentobox/limits/Limits.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import world.bentobox.bentobox.api.addons.GameModeAddon;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.limits.commands.AdminCommand;
import world.bentobox.limits.commands.PlayerCommand;
import world.bentobox.limits.commands.admin.AdminCommand;
import world.bentobox.limits.commands.player.PlayerCommand;
import world.bentobox.limits.listeners.BlockLimitsListener;
import world.bentobox.limits.listeners.EntityLimitListener;
import world.bentobox.limits.listeners.JoinListener;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.bentobox.limits.commands;
package world.bentobox.limits.commands.admin;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -10,6 +10,8 @@
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.util.Util;
import world.bentobox.limits.Limits;
import world.bentobox.limits.commands.player.LimitPanel;


/**
* Admin command for limits
Expand All @@ -27,7 +29,9 @@ public class AdminCommand extends CompositeCommand {
public AdminCommand(Limits addon, CompositeCommand parent) {
super(parent, "limits");
this.addon = addon;
new CalcCommand(addon, this);

new CalcCommand(this.addon, this);
new OffsetCommand(this.addon, this);
}

/* (non-Javadoc)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package world.bentobox.limits.commands;
package world.bentobox.limits.commands.admin;

import java.util.ArrayList;
import java.util.List;
Expand Down

0 comments on commit be3554b

Please sign in to comment.