Merge branch 'development' of github.com:craftinc/craftinc-gates into development
This commit is contained in:
commit
b37f1000ab
@ -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"
|
@ -535,7 +535,7 @@ public class GatesManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: call this method!
|
|
||||||
public void handleGateExitChange(final Gate g, final Location oldExit)
|
public void handleGateExitChange(final Gate g, final Location oldExit)
|
||||||
{
|
{
|
||||||
// nothing to do
|
// nothing to do
|
||||||
|
@ -22,6 +22,7 @@ import de.craftinc.gates.util.GateBlockChangeSender;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
import de.craftinc.gates.Plugin;
|
import de.craftinc.gates.Plugin;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
|
|
||||||
public class CommandExit extends BaseCommand
|
public class CommandExit extends BaseCommand
|
||||||
@ -47,8 +48,10 @@ public class CommandExit extends BaseCommand
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Location oldExit = gate.getExit();
|
||||||
gate.setExit(player.getLocation());
|
gate.setExit(player.getLocation());
|
||||||
sendMessage(ChatColor.GREEN + "The exit of gate '" + gate.getId() + "' is now where you stand.");
|
sendMessage(ChatColor.GREEN + "The exit of gate '" + gate.getId() + "' is now where you stand.");
|
||||||
|
Plugin.getPlugin().getGatesManager().handleGateExitChange(gate, oldExit);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
GateBlockChangeSender.updateGateBlocks(gate);
|
GateBlockChangeSender.updateGateBlocks(gate);
|
||||||
|
@ -20,6 +20,7 @@ package de.craftinc.gates.commands;
|
|||||||
import de.craftinc.gates.Plugin;
|
import de.craftinc.gates.Plugin;
|
||||||
import de.craftinc.gates.util.GateBlockChangeSender;
|
import de.craftinc.gates.util.GateBlockChangeSender;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
@ -46,8 +47,10 @@ public class CommandExitOpen extends BaseCommand
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Location oldExit = gate.getExit();
|
||||||
gate.setExit(player.getLocation());
|
gate.setExit(player.getLocation());
|
||||||
sendMessage(ChatColor.GREEN + "The exit of gate '" + gate.getId() + "' is now where you stand.");
|
sendMessage(ChatColor.GREEN + "The exit of gate '" + gate.getId() + "' is now where you stand.");
|
||||||
|
Plugin.getPlugin().getGatesManager().handleGateExitChange(gate, oldExit);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
boolean needsGateManagerUpdate = false;
|
boolean needsGateManagerUpdate = false;
|
||||||
|
@ -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;
|
||||||
|
@ -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";
|
||||||
@ -62,10 +63,10 @@ public class ConfigurationUtil
|
|||||||
material.material = Material.DEAD_BUSH;
|
material.material = Material.DEAD_BUSH;
|
||||||
}
|
}
|
||||||
else if (materialString.equals("dandelion")) {
|
else if (materialString.equals("dandelion")) {
|
||||||
material.material = Material.YELLOW_FLOWER; // TODO: this will change with minecraft 1.7
|
material.material = Material.YELLOW_FLOWER;
|
||||||
}
|
}
|
||||||
else if (materialString.equals("poppy")) {
|
else if (materialString.equals("poppy")) {
|
||||||
material.material = Material.RED_ROSE; // TODO: this will change with minecraft 1.7
|
material.material = Material.RED_ROSE;
|
||||||
}
|
}
|
||||||
else if (materialString.equals("brown mushroom")) {
|
else if (materialString.equals("brown mushroom")) {
|
||||||
material.material = Material.BROWN_MUSHROOM;
|
material.material = Material.BROWN_MUSHROOM;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user