mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2025-02-19 13:51:20 +01:00
Accept right clicks on signs
This commit is contained in:
parent
3e118f688e
commit
863e774266
@ -63,7 +63,6 @@ public enum DMessages implements Messages {
|
|||||||
ERROR_LEAVE_DUNGEON("Error_LeaveDungeon", "&4You have to leave your current dungeon first!"),
|
ERROR_LEAVE_DUNGEON("Error_LeaveDungeon", "&4You have to leave your current dungeon first!"),
|
||||||
ERROR_LEAVE_GAME("Error_LeaveGame", "&4You have to leave your current game first!"),
|
ERROR_LEAVE_GAME("Error_LeaveGame", "&4You have to leave your current game first!"),
|
||||||
ERROR_LEAVE_GROUP("Error_LeaveGroup", "&4You have to leave your group first!"),
|
ERROR_LEAVE_GROUP("Error_LeaveGroup", "&4You have to leave your group first!"),
|
||||||
ERROR_LEFT_CLICK("Error_Leftklick", "&4You have to use Left-Click on this sign!"),
|
|
||||||
ERROR_MSG_ID_NOT_EXIST("Error_MsgIdNotExist", "&4Messages with Id &6&v1&4 does not exist!"),
|
ERROR_MSG_ID_NOT_EXIST("Error_MsgIdNotExist", "&4Messages with Id &6&v1&4 does not exist!"),
|
||||||
ERROR_MSG_FORMAT("Error_MsgFormat", "&4The Messages has to be between \"!"),
|
ERROR_MSG_FORMAT("Error_MsgFormat", "&4The Messages has to be between \"!"),
|
||||||
ERROR_MSG_NO_INT("Error_MsgNoInt", "&4The argument [id] has to include a number!"),
|
ERROR_MSG_NO_INT("Error_MsgNoInt", "&4The argument [id] has to include a number!"),
|
||||||
|
@ -279,10 +279,8 @@ public class PlayerListener implements Listener {
|
|||||||
// Trigger InteractTrigger
|
// Trigger InteractTrigger
|
||||||
InteractTrigger trigger = InteractTrigger.getByBlock(clickedBlock, gameWorld);
|
InteractTrigger trigger = InteractTrigger.getByBlock(clickedBlock, gameWorld);
|
||||||
if (trigger != null) {
|
if (trigger != null) {
|
||||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
if (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||||
trigger.onTrigger(player);
|
trigger.onTrigger(player);
|
||||||
} else {
|
|
||||||
MessageUtil.sendMessage(player, DMessages.ERROR_LEFT_CLICK.getMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,10 +288,8 @@ public class PlayerListener implements Listener {
|
|||||||
for (Sign classSign : gameWorld.getSignClass()) {
|
for (Sign classSign : gameWorld.getSignClass()) {
|
||||||
if (classSign != null) {
|
if (classSign != null) {
|
||||||
if (classSign.getLocation().distance(clickedBlock.getLocation()) < 1) {
|
if (classSign.getLocation().distance(clickedBlock.getLocation()) < 1) {
|
||||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
if (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||||
dPlayer.setDClass(ChatColor.stripColor(classSign.getLine(1)));
|
dPlayer.setDClass(ChatColor.stripColor(classSign.getLine(1)));
|
||||||
} else {
|
|
||||||
MessageUtil.sendMessage(player, DMessages.ERROR_LEFT_CLICK.getMessage());
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ version: ${project.version}
|
|||||||
authors: [Frank Baumann, Milan Albrecht, Tobias Schmitz, Daniel Saukel]
|
authors: [Frank Baumann, Milan Albrecht, Tobias Schmitz, Daniel Saukel]
|
||||||
description: ${project.description}
|
description: ${project.description}
|
||||||
website: ${project.url}
|
website: ${project.url}
|
||||||
softdepend: [BlueRoseCommons, CommandsXL, ItemsXL, Vault, CustomMobs, InsaneMobs, MythicMobs]
|
softdepend: [BlueRoseCommons, CommandsXL, ItemsXL, Vault, CustomMobs, InsaneMobs, MythicMobs, HolographicDisplays]
|
||||||
commands:
|
commands:
|
||||||
dungeonsxl:
|
dungeonsxl:
|
||||||
description: Reference command for DungeonsXL.
|
description: Reference command for DungeonsXL.
|
||||||
|
Loading…
Reference in New Issue
Block a user