Bug Fix and Cleanup

This commit is contained in:
MattBDev
2016-04-28 16:38:51 -04:00
parent 669359cd37
commit 8f3d35bca3
68 changed files with 780 additions and 880 deletions

View File

@ -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();

View File

@ -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 {

View File

@ -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;

View File

@ -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;