Created
January 20, 2016 10:48
-
-
Save MrPowerGamerBR/85319898fafba7207886 to your computer and use it in GitHub Desktop.
Nukkit simple event
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mrpowergamerbr.walkit; | |
| import cn.nukkit.event.EventHandler; | |
| import cn.nukkit.event.Listener; | |
| import cn.nukkit.event.player.PlayerMoveEvent; | |
| import cn.nukkit.plugin.PluginBase; | |
| public class Main extends PluginBase implements Listener{ | |
| public void onEnable() { | |
| getServer().getPluginManager().registerEvents(this, this); | |
| } | |
| @EventHandler | |
| public void onMove(PlayerMoveEvent e) { | |
| e.getTo().getLevel().setBlockIdAt(e.getTo().getFloorX(), e.getTo().getFloorY() - 1, e.getTo().getFloorZ(), 57); | |
| e.getPlayer().sendMessage("lalal"); | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment