-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bukkit listeners! (don't work since there is a bug on nukkit)
- Loading branch information
Showing
11 changed files
with
395 additions
and
299 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package aldrigos.mc.worldguard; | ||
|
||
import cn.nukkit.command.CommandSender; | ||
import cn.nukkit.utils.TextFormat; | ||
|
||
public enum Messages { | ||
NO_PERM(TextFormat.RED+"[WG]No permission for %s"), | ||
PARAM_MISS(TextFormat.RED+"[WG]Missing parameter. Usage: %s"), | ||
PLAYERCMD("[WG]This is a player command!"), | ||
NO_SELECTION(TextFormat.RED+"[WG]No selection was made"), | ||
REGION_EXIST(TextFormat.RED+"[WG]Region %s already exist"), | ||
REGION_NOT_EXIST(TextFormat.RED+"[WG]Region %s doesn't exist"), | ||
REGION_CREATED(TextFormat.GREEN+"[WG]Region %s created"), | ||
REGION_UPDATED(TextFormat.YELLOW+"[WG]Region %s updated"), | ||
REGION_PROTECTED(TextFormat.RED+"[WG]Region is protected"), | ||
REGION_NAME_INVALID(TextFormat.RED+"[WG]Invalid region name %s"), | ||
FLAG_INVALID(TextFormat.RED+"[WG]Flag: %s is invalid"), | ||
FLAG_MOD_INVALID(TextFormat.RED+"[WG]Invalid flag modifier: %s"), | ||
FLAG_ADDED(TextFormat.GREEN+"[WG]Region %s flag %s %s added"), | ||
FLAG_LIST(TextFormat.YELLOW+"[WG]Available flags: %s"), | ||
FLAG_DENIED(TextFormat.RED+"[WG]%s is denied in this region") | ||
; | ||
|
||
private final String text; | ||
|
||
Messages(String msg){ | ||
text = msg +TextFormat.RESET; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return text; | ||
} | ||
|
||
public void send(CommandSender to, Object... args){ | ||
to.sendMessage(String.format(this.toString(), args)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.