Added messages.yml, must be implemented.
This commit is contained in:
parent
110c5cbfd5
commit
6319b181c4
5 changed files with 162 additions and 6 deletions
|
@ -229,7 +229,7 @@ public class V10LiftAPI {
|
|||
*
|
||||
* @param blocks The blockset
|
||||
* @param block The LiftBlock
|
||||
* @return 0 if added, -1 if null or doesn't exists, -2 if forbidden, -3 if already added
|
||||
* @return 0 if added, -2 if forbidden, -3 if already added
|
||||
*/
|
||||
public int addBlockToLift(@Nonnull Set<LiftBlock> blocks, @Nonnull LiftBlock block) {
|
||||
if (getFBM().isForbidden(block.getMat())) return -2;
|
||||
|
|
|
@ -365,7 +365,7 @@ public class V10LiftCommand implements CommandExecutor {
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
sender.sendMessage(ChatColor.YELLOW + "Plugin reset successful!");
|
||||
sender.sendMessage(ChatColor.YELLOW + "Plugin reloaded successfully!");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -566,6 +566,10 @@ public class V10LiftCommand implements CommandExecutor {
|
|||
} else {
|
||||
OfflinePlayer wp = Bukkit.getOfflinePlayer(args[2]);
|
||||
wpu = wp.getUniqueId();
|
||||
if (!wp.hasPlayedBefore()) {
|
||||
sender.sendMessage(ChatColor.RED + "Player " + args[2] + " not found!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
String floor = null;
|
||||
|
|
|
@ -266,10 +266,6 @@ public class PlayerInteractListener implements Listener {
|
|||
if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return;
|
||||
e.setCancelled(true);
|
||||
Block block = e.getClickedBlock();
|
||||
if (V10LiftPlugin.getAPI().getFBM().isForbidden(block.getType())) {
|
||||
p.sendMessage(ChatColor.RED + "The material " + e.getClickedBlock().getType().toString() + " is currently not supported!");
|
||||
return;
|
||||
}
|
||||
String liftName = DataManager.getEditPlayer(p.getUniqueId());
|
||||
if (!V10LiftPlugin.getAPI().containsRope(liftName, block)) {
|
||||
p.sendMessage(ChatColor.RED + "This block is not part of the rope.");
|
||||
|
|
|
@ -2,6 +2,8 @@ SignText: "[v10lift]"
|
|||
DefectText: "&kDefect!"
|
||||
DisabledText: "&cDisabled"
|
||||
MaintenanceText: "&cMaintenance"
|
||||
UpText: "&aup"
|
||||
DownText: "&adown"
|
||||
DefectRate: 0.0
|
||||
RepairItem: REDSTONE
|
||||
RepairAmount: 5
|
||||
|
|
154
src/main/resources/messages.yml
Normal file
154
src/main/resources/messages.yml
Normal file
|
@ -0,0 +1,154 @@
|
|||
General:
|
||||
#General
|
||||
NoPermission: "&cYou don't have the permission to do this."
|
||||
PlayerOnly: "&cYou have to be a player to do this."
|
||||
IncorrectUsage: "&cPlease use %Command%"
|
||||
InternalError: "&cInternal error!"
|
||||
|
||||
#General lift
|
||||
DoesntExists: "&cA lift with that name doesn't exists."
|
||||
AlreadyExists: "&cA lift with that name already exists."
|
||||
SwitchOnEdit: "&cFirst switch on the editor mode!"
|
||||
DetectionFailed: "&cAutomatic floor detection failed!"
|
||||
FloorDoesntExists: "&cThe floor %Name% doesn't exists!"
|
||||
|
||||
#Control lift
|
||||
NoWhitelistPermission: "&cYou can't go to that floor!"
|
||||
NoFloors: "&cThis elevator has no floors!"
|
||||
|
||||
#Anti break
|
||||
RemoveLiftFirst: "&cYou can't do this! Remove the lift first."
|
||||
RemoveRopeFirst: "&cYou can't do this! Remove the rope first."
|
||||
RemoveDoorFirst: "&cYou can't do this! Remove the door first."
|
||||
|
||||
Create:
|
||||
AddBlocks: "&aOkay, now add all the blocks from the cab by right-clicking on the blocks.\n&aThen type: /v10lift create <Name>"
|
||||
NoBlocks: "&cAdd blocks first."
|
||||
Created: "&aThe lift %Name% is successfully created."
|
||||
|
||||
Delete:
|
||||
NotRemoved: "&cThe lift %Name% couldn't be removed."
|
||||
Removed: "&aThe lift %Name% is successfully removed."
|
||||
|
||||
Rename:
|
||||
Renamed: "&aLift successfully renamed!"
|
||||
|
||||
Edit:
|
||||
StillInEditMode: "&cYou are still in editor mode."
|
||||
TurnedOn: "&aEditor turned on."
|
||||
TurnedOff: "&aEditor turned off."
|
||||
|
||||
Floor:
|
||||
ToHigh: "&cThat floor is too high!"
|
||||
AlreadyExists: "&cThat floor already exists!"
|
||||
DoesntExists: "&cThat floor doesn't exists!"
|
||||
Added: "&aFloor successfully added!"
|
||||
Removed: "&aFloor successfully removed!"
|
||||
Renamed: "&aFloor successfully renamed!"
|
||||
|
||||
Input:
|
||||
StillAdjusting: "&cYou are still adjusting an input!"
|
||||
NothingToRemove: "&cThere is no input to remove!"
|
||||
AlreadyAdded: "&cThis block has already been chosen as an input. Choose another block!"
|
||||
NoInput: "&cThis block is not an input. Choose another block!"
|
||||
RightClick: "&aNow right click on the input block!"
|
||||
Created: "&aInput created!"
|
||||
Removed: "&aInput removed!"
|
||||
|
||||
OfflineInput:
|
||||
StillAdjusting: "&cYou are still adjusting an offline input!"
|
||||
NothingToRemove: "&cThere is no offline input to remove!"
|
||||
AlreadyAdded: "&cThis block has already been chosen as an offline input. Choose another block!"
|
||||
NoInput: "&cThis block is not an offline input. Choose another block!"
|
||||
RightClick: "&aNow right click on the offline input block!"
|
||||
Created: "&aOffline input created!"
|
||||
Removed: "&aOffline input removed!"
|
||||
|
||||
Build:
|
||||
Disabled: "&aConstruction mode disabled!"
|
||||
Enabled: "&aNow right-click on the elevator blocks!\n&aThen do /v10lift build to save it!"
|
||||
BlockAdded: "&aBlock added to the elevator."
|
||||
BlockRemoved: "&6Block removed from the elevator."
|
||||
BlacklistedMaterial: "&cThe material %Name% cannot be used!"
|
||||
|
||||
Rope:
|
||||
StillAdjusting: "&cYou are still adjusting a rope."
|
||||
OnlyUp: "&cA rope can only go up!"
|
||||
OnlyOneMaterial: "&cThe rope must be of the same material!"
|
||||
AlreadyARope: "&cPart of the rope is already part of another rope!"
|
||||
NotARope: "&cThis block is not part of the rope."
|
||||
BlacklistedMaterial: "&cThe rope is build of blacklisted blocks!"
|
||||
Add: "&aNow right-click on the beginning and the end of the rope."
|
||||
Delete: "&aNow right-click on the rope."
|
||||
ClickOnEnd: "&6Now right-click on the end of the rope!"
|
||||
PartRemoved: "&6Start removed!\n&6Now right-click on the end of the rope!"
|
||||
Created: "&aRope created."
|
||||
Removed: "&aRope removed."
|
||||
|
||||
Door:
|
||||
BlacklistedMaterial: "&cThe material %Name% is currently not supported!"
|
||||
Disabled: "&aDoor editor mode disabled!"
|
||||
Enabled: "&aNow right-click on the door blocks! (If it are real doors, click on the bottom block)\n&aThen do /v10lift door to save it."
|
||||
Created: "&aDoor created."
|
||||
Removed: "&6Door removed."
|
||||
|
||||
Whitelist:
|
||||
Group:
|
||||
VaultNotFound: "&cYou can't add a group when Vault is not found."
|
||||
NotFound: "&cThe group %Name% is not found."
|
||||
AlreadyContains: "&cWhitelist already contains this group!"
|
||||
DoesntContains: "&cWhitelist doesn't contain this group!"
|
||||
Added: "&aGroup added to whitelist!"
|
||||
Removed: "&aGroup removed from whitelist!"
|
||||
Player:
|
||||
NotFound: "&cThe player %Name% is not found."
|
||||
AlreadyContains: "Whitelist already contains this user!"
|
||||
DoesntContains: "&cWhitelist doesn't contain this user!"
|
||||
Added: "&aUser added to whitelist!"
|
||||
Removed: "&aUser removed from whitelist!"
|
||||
|
||||
Whois:
|
||||
NotALift: "&cThis block is not part of a lift."
|
||||
WithoutName: "&aNow right-click on the block you want to check."
|
||||
|
||||
Speed:
|
||||
WrongSpeed: "&cThe speed %Speed% is incorrect."
|
||||
Changed: "&aLift speed changed!"
|
||||
|
||||
Sound:
|
||||
TurnedOn: "&aSound mode turned on!"
|
||||
TurnedOff: "&aSound mode turned off!"
|
||||
|
||||
Realistic:
|
||||
TurnedOn: "&aRealistic mode turned on!"
|
||||
TurnedOff: "&aRealistic mode turned off!"
|
||||
|
||||
Disable:
|
||||
AlreadyDefective: "&cThis lift is already defective!"
|
||||
Disabled: "&aLift disabled!"
|
||||
|
||||
Repair:
|
||||
NotDefective: "&cThis lift isn't defective!"
|
||||
ItemsNeeded: "&cYou need %Amount%x %ItemName%!"
|
||||
Repaired: "&aLift repaired!"
|
||||
|
||||
Abort:
|
||||
NothingToCancel: "&cOops! You can't cancel anything."
|
||||
Cancelled: "&6Cancelled."
|
||||
|
||||
Reload:
|
||||
Reloaded: "&6Plugin reloaded successfully!"
|
||||
|
||||
Start:
|
||||
NonPlayer: "&cPlease give a name as non-player!"
|
||||
Started: "&aLift %Name% started."
|
||||
|
||||
Stop:
|
||||
NonPlayer: "&cPlease give a name as non-player!"
|
||||
NoMovingTasks: "&cLift %Name% doesn't contain any movingtasks!"
|
||||
Started: "&aLift %Name% stopped."
|
||||
|
||||
LiftSign:
|
||||
NoName: "&cNo lift name given!"
|
||||
Created: "&aLift sign created!"
|
||||
Removed: "&6Lift sign removed!"
|
Loading…
Reference in a new issue