implemented selections

This commit is contained in:
sekwah41 2018-02-01 19:29:14 +00:00 committed by Sekwah
parent aa5dc09f23
commit c515be0473
2 changed files with 11 additions and 1 deletions

View File

@ -50,6 +50,8 @@ portal.invalidselection=You must have both pos1 and pos2 selected to create a po
portal.noname=No name for the portal has been given.
portal.takenname=The name given for the portal is already taken.
portal.selector.poschange=\u00A7eYou have selected pos%1$s X:%2$s Y:%3$s Z:%4$s
command.trans.help=Copy translation new default translation file
command.version.help=Returns the current version of the plugin

View File

@ -79,7 +79,15 @@ public class PortalManager {
}
public void playerSelectorActivate(PlayerContainer player, PortalLocation blockLoc, boolean leftClick) {
int side = leftClick ? 1 : 2;
if(leftClick) {
this.portalSelectorLeftClick.put(player.getUUID().toString(), blockLoc);
}
else {
this.portalSelectorRightClick.put(player.getUUID().toString(), blockLoc);
}
player.sendMessage(Lang.translateInsertVariablesColor("portal.selector.poschange", side, blockLoc.posX,
blockLoc.posY, blockLoc.posZ));
}
public boolean playerMove(PlayerContainer player, PlayerLocation fromLoc, PlayerLocation toLoc) {