Jump to content

Pickups erstellen


Joey
 Share

Recommended Posts

Heay,

ich habe mal es mal versucht jedoch wird, wenn ich den Cokkie aufnehmen nichts ausgeführt !


		@EventHandler

		public void PlayerPickupItemEvent(PlayerPickupItemEvent e) {


			Player p = e.getPlayer();

			Item Item = e.getItem();


			if (cookie == null){

				p.sendMessage("cookie == null");

				return;

			}

			if (Item == cookie) {

				p.sendMessage("geht1");

				e.setCancelled(true);

				p.getInventory().addItem(new ItemStack(Material.BEACON, 1));

				p.sendMessage("?4Du hast ein ?2Beacon ?4bekommen!");

			}

			p.sendMessage("geht2");

Mfg.

Joey

Edited by Joey
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...
B
B