This repository has been archived by the owner on May 18, 2020. It is now read-only.
General extra functions
jaime29010 edited this page Nov 13, 2016
·
7 revisions
This plugin adds lots of extra features to players.
To use these features at first you must get a Player instance:
Player player = (Player) BungeeCord.getInstance().getPlayer("<name>");
The class ProxiedPlayer can be cast to the Player class.
- Play a Minecraft sound
- Perform commands
- Send packets to a player
- Send packets to a server
- Create/edit the scoreboard
//Get the player location
Location loc = player.getLocation();
//Play the effect.
//First argument is the Sound.
//Second argument is the location wehere the sound plays.
//Third argument is the volume of the sound.
player.playSound(SoundEffect.getEffect("block.anvil.land"), SoundCategory.MASTER, loc, 1F, 0);
//The player will perform the command "say hello world" on the server
player.performCommand("/say hello world");
//Send the player a custom packet. Available packets are listed below.
player.sendPacket(PacketPlayOut packet);
Available packets:
- PacketPlayOutChat
- PacketPlayOutPlayerListHeaderFooter
- PacketPlayOutDisconnect
- PacketPlayOutEntityEquipment
- PacketPlayOutPosition
- PacketPlayOutHeldItemSlot
- PacketPlayOutEntityAbstract
- PacketPlayOutEntityAbstract
- PacketPlayOutEntityAbstract
- PacketPlayOutEntityAbstract
- PacketPlayOutEntityAbstract
- PacketPlayOutEntityDestroy
- PacketPlayOutEntityEffect
- PacketPlayOutRemoveEntityEffect
- PacketPlayOutWorldParticles
- PacketPlayOutGameStateChange
- PacketPlayOutCloseWindow
- PacketPlayOutSetSlot
- PacketPlayOutOpenWindow
- PacketPlayOutTransaction
- PacketPlayOutWindowData
- PacketPlayOutWindowItems
- PacketPlayOutStatistic
- PacketPlayOutPlayerInfo
- PacketPlayOutScoreboardTeam
//Send the server over the player a custompacket. Available packets are listed below.
player.sendPacketToServer(PacketPlayIn packet);
Available packets:
- PacketPlayInChat
- PacketPlayInUseEntity
- PacketPlayInPosition
- PacketPlayInLook
- PacketPlayInPositionLook
- PacketPlayInBlockDig
- PacketPlayInBlockPlace
- PacketPlayInHeldItemSlot
- PacketPlayInArmAnimation
- PacketPlayInCloseWindow
- PacketPlayInWindowClick