Display a not allowed while riding message.

This commit is contained in:
Tobias Ottenweller 2014-02-05 20:23:59 +01:00
parent a579209037
commit b676af278d
3 changed files with 5 additions and 2 deletions

View File

@ -7,4 +7,5 @@ gateTeleportMessage: "Thank you for traveling with Craft Inc. Gates."
showTeleportMessage: true showTeleportMessage: true
gateTeleportNoPermissionMessage: "You are not allowed to use this gate!" gateTeleportNoPermissionMessage: "You are not allowed to use this gate!"
showTeleportNoPermissionMessage: true showTeleportNoPermissionMessage: true
gateTeleportVehicleNotAllowedMessage: "You must not use that gate while riding!"
gateMaterial: "nether portal" gateMaterial: "nether portal"

View File

@ -110,8 +110,9 @@ public class PlayerMoveListener implements Listener
if (vehicle != null && (!vehicleIsSuitable) || !gate.getAllowsVehicles()) { if (vehicle != null && (!vehicleIsSuitable) || !gate.getAllowsVehicles()) {
if (!gate.getAllowsVehicles()) { if (!gate.getAllowsVehicles() && Plugin.getPlugin().getConfig().getBoolean(ConfigurationUtil.confShowTeleportNoPermissionMessageKey)) {
// TODO: display not allowed message final String notAllowedMessage = Plugin.getPlugin().getConfig().getString(ConfigurationUtil.confGateTeleportVehicleNotAllowedMessageKey);
player.sendMessage(ChatColor.DARK_AQUA + notAllowedMessage);
} }
return; return;

View File

@ -29,6 +29,7 @@ public class ConfigurationUtil
public static final String confPlayerGateBlockUpdateRadiusKey = "playerGateBlockUpdateRadius"; public static final String confPlayerGateBlockUpdateRadiusKey = "playerGateBlockUpdateRadius";
public static final String confCheckForBrokenGateFramesKey = "checkForBrokenGateFrames"; public static final String confCheckForBrokenGateFramesKey = "checkForBrokenGateFrames";
public static final String confGateTeleportMessageKey = "gateTeleportMessage"; public static final String confGateTeleportMessageKey = "gateTeleportMessage";
public static final String confGateTeleportVehicleNotAllowedMessageKey = "gateTeleportVehicleNotAllowedMessage";
public static final String confShowTeleportMessageKey = "showTeleportMessage"; public static final String confShowTeleportMessageKey = "showTeleportMessage";
public static final String confGateTeleportNoPermissionMessageKey = "gateTeleportNoPermissionMessage"; public static final String confGateTeleportNoPermissionMessageKey = "gateTeleportNoPermissionMessage";
public static final String confShowTeleportNoPermissionMessageKey = "showTeleportNoPermissionMessage"; public static final String confShowTeleportNoPermissionMessageKey = "showTeleportNoPermissionMessage";