Display a not allowed while riding message.
This commit is contained in:
parent
a579209037
commit
b676af278d
@ -7,4 +7,5 @@ gateTeleportMessage: "Thank you for traveling with Craft Inc. Gates."
|
||||
showTeleportMessage: true
|
||||
gateTeleportNoPermissionMessage: "You are not allowed to use this gate!"
|
||||
showTeleportNoPermissionMessage: true
|
||||
gateTeleportVehicleNotAllowedMessage: "You must not use that gate while riding!"
|
||||
gateMaterial: "nether portal"
|
@ -110,8 +110,9 @@ public class PlayerMoveListener implements Listener
|
||||
|
||||
if (vehicle != null && (!vehicleIsSuitable) || !gate.getAllowsVehicles()) {
|
||||
|
||||
if (!gate.getAllowsVehicles()) {
|
||||
// TODO: display not allowed message
|
||||
if (!gate.getAllowsVehicles() && Plugin.getPlugin().getConfig().getBoolean(ConfigurationUtil.confShowTeleportNoPermissionMessageKey)) {
|
||||
final String notAllowedMessage = Plugin.getPlugin().getConfig().getString(ConfigurationUtil.confGateTeleportVehicleNotAllowedMessageKey);
|
||||
player.sendMessage(ChatColor.DARK_AQUA + notAllowedMessage);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -29,6 +29,7 @@ public class ConfigurationUtil
|
||||
public static final String confPlayerGateBlockUpdateRadiusKey = "playerGateBlockUpdateRadius";
|
||||
public static final String confCheckForBrokenGateFramesKey = "checkForBrokenGateFrames";
|
||||
public static final String confGateTeleportMessageKey = "gateTeleportMessage";
|
||||
public static final String confGateTeleportVehicleNotAllowedMessageKey = "gateTeleportVehicleNotAllowedMessage";
|
||||
public static final String confShowTeleportMessageKey = "showTeleportMessage";
|
||||
public static final String confGateTeleportNoPermissionMessageKey = "gateTeleportNoPermissionMessage";
|
||||
public static final String confShowTeleportNoPermissionMessageKey = "showTeleportNoPermissionMessage";
|
||||
|
Loading…
x
Reference in New Issue
Block a user