Package org.getspout.spout.player

Examples of org.getspout.spout.player.SpoutCraftPlayer.sendPacket()


    }
    if (update != null) {
      Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Spout.getInstance(), update, 2);
    }
    if (event.getPlayer() instanceof SpoutPlayer) {
      scp.sendPacket(new PacketAllowVisualCheats(PermHandler.allowSkyCheat(scp),PermHandler.forceSkyCheat(scp),PermHandler.showSkyCheat(scp),PermHandler.allowClearWaterCheat(scp),PermHandler.forceClearWaterCheat(scp),PermHandler.showClearWaterCheat(scp),PermHandler.allowStarsCheat(scp),PermHandler.forceStarsCheat(scp),PermHandler.showStarsCheat(scp),PermHandler.allowWeatherCheat(scp),PermHandler.forceWeatherCheat(scp),PermHandler.showWeatherCheat(scp),PermHandler.allowTimeCheat(scp),PermHandler.allowCoordsCheat(scp),PermHandler.allowEntityLabelCheat(scp),PermHandler.allowVoidFogCheat(scp),PermHandler.forceVoidFogCheat(scp),PermHandler.showVoidFogCheat(scp),PermHandler.allowFlightSpeedCheat(scp)));
    }
  }

  @EventHandler(priority = EventPriority.MONITOR)
  public void onPlayerInteract(PlayerInteractEvent event) {
View Full Code Here


        for (Player player : players) {
          if (player instanceof SpoutCraftPlayer) {
            SpoutCraftPlayer spc = (SpoutCraftPlayer) player;
            if (spc.isSpoutCraftEnabled()) {
              spc.sendPacket(packet);
            }
          }
        }
      } else {
        for (int i = 0; i < xCoords.size(); i++) {
View Full Code Here

          SpoutPacket packet = new PacketCustomBlockOverride(xCoords.get(i), yCoords.get(i), zCoords.get(i), typeIds.get(i), data.get(i));
          for (Player player : players) {
            if (player instanceof SpoutCraftPlayer) {
              SpoutCraftPlayer spc = (SpoutCraftPlayer) player;
              if (spc.isSpoutCraftEnabled()) {
                spc.sendPacket(packet);
              }
            }
          }
        }
      }
View Full Code Here

  public void playSoundEffect(SpoutPlayer target, SoundEffect effect, Location location, int distance, int volumePercent) {
    if (target.isSpoutCraftEnabled()) {
      SpoutCraftPlayer ccp = (SpoutCraftPlayer) target;
      if (location == null || ccp.getWorld().equals(location.getWorld())) {
        if (location == null) {
          ccp.sendPacket(new PacketPlaySound(effect, distance, volumePercent));
        } else {
          ccp.sendPacket(new PacketPlaySound(effect, location, distance, volumePercent));
        }
      }
    }
View Full Code Here

      SpoutCraftPlayer ccp = (SpoutCraftPlayer) target;
      if (location == null || ccp.getWorld().equals(location.getWorld())) {
        if (location == null) {
          ccp.sendPacket(new PacketPlaySound(effect, distance, volumePercent));
        } else {
          ccp.sendPacket(new PacketPlaySound(effect, location, distance, volumePercent));
        }
      }
    }
  }
View Full Code Here

              return;
            }
            volumePercent = event.getVolumePercent();
          }
          SpoutCraftPlayer ccp = (SpoutCraftPlayer) target;
          ccp.sendPacket(new PacketDownloadMusic(plugin != null ? plugin.getDescription().getName() : "temp", Url, location, distance, volumePercent, soundEffect, notify));
        }
      } else {
        throw new UnsupportedOperationException("All audio files must be ogg vorbis, wav, or midi type");
      }
    }
View Full Code Here

    for (Player player : online) {
      try {
        SpoutCraftPlayer scp = (SpoutCraftPlayer) SpoutCraftPlayer.getPlayer(player);
        scp.resetMovement();
        if (scp.isSpoutCraftEnabled()) {
          scp.sendPacket(new PacketRenderDistance(true, true));
        }
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.