mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 18:24:43 +02:00
Bug Fix and Cleanup
This commit is contained in:
@ -182,7 +182,7 @@ public class MainListener {
|
||||
}
|
||||
|
||||
@Listener
|
||||
public void onSpawnEntity(SpawnEntityEvent event) throws Exception {
|
||||
public void onSpawnEntity(SpawnEntityEvent event) {
|
||||
World world = event.getTargetWorld();
|
||||
event.filterEntities(entity -> {
|
||||
if (entity instanceof Player) {
|
||||
@ -283,7 +283,7 @@ public class MainListener {
|
||||
});
|
||||
}
|
||||
|
||||
public void onNotifyNeighborBlock(NotifyNeighborBlockEvent event) throws Exception {
|
||||
public void onNotifyNeighborBlock(NotifyNeighborBlockEvent event) {
|
||||
AtomicBoolean cancelled = new AtomicBoolean(false);
|
||||
// SpongeUtil.printCause("physics", event.getCause());
|
||||
// PlotArea area = plotloc.getPlotArea();
|
||||
@ -320,7 +320,7 @@ public class MainListener {
|
||||
}
|
||||
|
||||
@Listener
|
||||
public void onInteract(InteractEvent event) throws Exception {
|
||||
public void onInteract(InteractEvent event) {
|
||||
Player player = SpongeUtil.getCause(event.getCause(), Player.class);
|
||||
if (player == null) {
|
||||
event.setCancelled(true);
|
||||
@ -366,7 +366,7 @@ public class MainListener {
|
||||
}
|
||||
|
||||
@Listener
|
||||
public void onExplosion(ExplosionEvent e) throws Exception {
|
||||
public void onExplosion(ExplosionEvent e) {
|
||||
if (e instanceof ExplosionEvent.Detonate) {
|
||||
ExplosionEvent.Detonate event = (Detonate) e;
|
||||
World world = event.getTargetWorld();
|
||||
|
@ -3,7 +3,6 @@ package com.plotsquared.sponge.util;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.AbstractTitle;
|
||||
import com.plotsquared.sponge.object.SpongePlayer;
|
||||
import org.spongepowered.api.text.Text;
|
||||
import org.spongepowered.api.text.title.Title;
|
||||
|
||||
public class SpongeTitleManager extends AbstractTitle {
|
||||
|
@ -116,7 +116,6 @@ public class SlowQueue implements PlotQueue<Chunk> {
|
||||
IChunkProvider provider = nmsWorld.getChunkProvider();
|
||||
if (!(provider instanceof ChunkProviderServer)) {
|
||||
PS.debug("Not valid world generator for: " + world);
|
||||
return;
|
||||
}
|
||||
/* ChunkProviderServer chunkServer = (ChunkProviderServer) provider;
|
||||
IChunkProvider chunkProvider = chunkServer.serverChunkGenerator;
|
||||
|
@ -8,6 +8,7 @@ import com.plotsquared.sponge.SpongeMain;
|
||||
import com.plotsquared.sponge.object.SpongePlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
public class SpongeOnlineUUIDWrapper extends UUIDWrapper {
|
||||
|
||||
@ -36,7 +37,7 @@ public class SpongeOnlineUUIDWrapper extends UUIDWrapper {
|
||||
String name;
|
||||
try {
|
||||
name = SpongeMain.THIS.getResolver().get(uuid, true).get().getName().orElse(null);
|
||||
} catch (final Exception e) {
|
||||
} catch (InterruptedException | ExecutionException ignored) {
|
||||
name = null;
|
||||
}
|
||||
final String username = name;
|
||||
|
Reference in New Issue
Block a user