|
1 | 1 | package com.fastasyncworldedit.bukkit.listener; |
2 | 2 |
|
3 | | -import com.fastasyncworldedit.core.command.tool.MovableTool; |
4 | 3 | import com.fastasyncworldedit.core.command.tool.ResettableTool; |
5 | 4 | import com.fastasyncworldedit.core.command.tool.scroll.ScrollTool; |
6 | 5 | import com.sk89q.worldedit.LocalSession; |
7 | 6 | import com.sk89q.worldedit.bukkit.BukkitAdapter; |
8 | 7 | import com.sk89q.worldedit.bukkit.BukkitPlayer; |
9 | 8 | import com.sk89q.worldedit.command.tool.Tool; |
10 | 9 | import org.bukkit.Bukkit; |
11 | | -import org.bukkit.Location; |
12 | 10 | import org.bukkit.entity.Player; |
13 | 11 | import org.bukkit.event.EventHandler; |
14 | 12 | import org.bukkit.event.EventPriority; |
15 | 13 | import org.bukkit.event.Listener; |
16 | 14 | import org.bukkit.event.block.Action; |
17 | 15 | import org.bukkit.event.player.PlayerInteractEvent; |
18 | 16 | import org.bukkit.event.player.PlayerItemHeldEvent; |
19 | | -import org.bukkit.event.player.PlayerMoveEvent; |
20 | 17 | import org.bukkit.plugin.Plugin; |
21 | 18 |
|
22 | 19 | public class BrushListener implements Listener { |
@@ -49,24 +46,6 @@ public void onPlayerItemHoldEvent(final PlayerItemHeldEvent event) { |
49 | 46 | } |
50 | 47 | } |
51 | 48 |
|
52 | | - @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) |
53 | | - public void onPlayerMove(PlayerMoveEvent event) { |
54 | | - Location from = event.getFrom(); |
55 | | - Location to = event.getTo(); |
56 | | - if ((from.getYaw() != to.getYaw() && from.getPitch() != to.getPitch()) || from.getBlockX() != to.getBlockX() || from.getBlockZ() != to |
57 | | - .getBlockZ() || from.getBlockY() != to.getBlockY()) { |
58 | | - Player bukkitPlayer = event.getPlayer(); |
59 | | - com.sk89q.worldedit.entity.Player player = BukkitAdapter.adapt(bukkitPlayer); |
60 | | - LocalSession session = player.getSession(); |
61 | | - Tool tool = session.getTool(player); |
62 | | - if (tool != null) { |
63 | | - if (tool instanceof MovableTool) { |
64 | | - ((MovableTool) tool).move(player); |
65 | | - } |
66 | | - } |
67 | | - } |
68 | | - } |
69 | | - |
70 | 49 | @EventHandler(priority = EventPriority.LOWEST) |
71 | 50 | public void onPlayerInteract(final PlayerInteractEvent event) { |
72 | 51 | Player bukkitPlayer = event.getPlayer(); |
|
0 commit comments