Fix BucketEntityEvent on 1.15 (and 1.19 Build servers) #225
@ -25,6 +25,7 @@ import de.steamwar.bausystem.config.BauServer;
|
||||
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import de.steamwar.linkage.Linked;
|
||||
import de.steamwar.linkage.MinVersion;
|
||||
import de.steamwar.sql.BauweltMember;
|
||||
import de.steamwar.techhider.TechHider;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -223,13 +224,6 @@ public class SpectatorListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||
public void onPlayerBucketEntity(PlayerBucketEntityEvent event) {
|
||||
if (!Permission.BUILD.hasPermission(event.getPlayer())) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||
public void onPlayerBucketFill(PlayerBucketFillEvent event) {
|
||||
if (!Permission.BUILD.hasPermission(event.getPlayer())) {
|
||||
@ -251,4 +245,15 @@ public class SpectatorListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Linked
|
||||
@MinVersion(20)
|
||||
public static class SpectatorListener20 implements Listener {
|
||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||
public void onPlayerBucketEntity(PlayerBucketEntityEvent event) {
|
||||
if (!Permission.BUILD.hasPermission(event.getPlayer())) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren