Permission toggle

Discussion in 'Bukkit Help' started by baldursgate3, May 11, 2013.

Thread Status:
Not open for further replies.
  1. Offline


    Hello, my problem is that when player runs a command (which can be toggled on/off) he gets the effect, but when he, let' say exits the world which he has permission in, and travels to a different world which doesn't have that permission, the effect is still toggled on eventhough he does not have permission.
    If anyone has any idea how to fix it, please do tell.
    Here's my code for plugin.
    public void onPlayerJump(PlayerMoveEvent event) {
    Player p = event.getPlayer();

    Location from = event.getFrom();
    Location to = event.getTo();

    if ((to.getY() > from.getY()) && (plugin.activePlayers.containsKey(p))) {
    Location loc = p.getLocation();
    double loc_y = loc.getY() - 2.0D;
    Block floor = loc.getBlock();
    if ((floor.getTypeId() != 0) && (loc_y < 128.0D)) {
    int m = ((Integer)plugin.activePlayers.get(p)).intValue();
    double velo_x = (to.getX() - from.getX()) * m;
    double velo_y = (to.getY() - from.getY()) * m;
    double velo_z = (to.getZ() - from.getZ()) * m;

    Vector velo_new = new Vector(velo_x, velo_y, velo_z);
    I want it to be disabled when the player has no permissions.
  2. Offline


    try bukkit developement forum, you might get more help there
Thread Status:
Not open for further replies.

Share This Page