Minor merging fixes
This commit is contained in:
@@ -2,7 +2,6 @@ package mc.core.events.api.interfaces;
|
|||||||
|
|
||||||
import mc.core.Location;
|
import mc.core.Location;
|
||||||
import mc.core.player.Player;
|
import mc.core.player.Player;
|
||||||
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -17,6 +16,6 @@ public interface PlayerProvidingEvent extends LocationProvidingEvent {
|
|||||||
if (players.size() == 1)
|
if (players.size() == 1)
|
||||||
return Collections.singletonList(players.get(0).getLocation());
|
return Collections.singletonList(players.get(0).getLocation());
|
||||||
else
|
else
|
||||||
throw new NotImplementedException();
|
throw new RuntimeException("This method is not implemented.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ package mc.core.events.api.samples;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import mc.core.Location;
|
import mc.core.Location;
|
||||||
import mc.core.block.Block;
|
|
||||||
import mc.core.events.EventBase;
|
import mc.core.events.EventBase;
|
||||||
import mc.core.events.api.interfaces.LocationProvidingEvent;
|
import mc.core.events.api.interfaces.LocationProvidingEvent;
|
||||||
import mc.core.events.api.interfaces.PlayerProvidingEvent;
|
import mc.core.events.api.interfaces.PlayerProvidingEvent;
|
||||||
import mc.core.player.Player;
|
import mc.core.player.Player;
|
||||||
|
import mc.core.world.block.Block;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -19,7 +19,6 @@ public class BlockBreakEvent extends EventBase implements PlayerProvidingEvent,
|
|||||||
private final Player player;
|
private final Player player;
|
||||||
private final Block block;
|
private final Block block;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Player> getAssociatedPlayers() {
|
public List<Player> getAssociatedPlayers() {
|
||||||
return Collections.singletonList(player);
|
return Collections.singletonList(player);
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package mc.core.events.runner;
|
package mc.core.events.runner;
|
||||||
|
|
||||||
import sun.plugin.dom.exception.InvalidStateException;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -35,7 +33,7 @@ public class ResourceAwareExecutorService {
|
|||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
if (executorThreads.size() > 0)
|
if (executorThreads.size() > 0)
|
||||||
throw new InvalidStateException("This executor service was already started.");
|
throw new RuntimeException("This executor service was already started.");
|
||||||
|
|
||||||
for (int i = 0; i < threadCount; i++) {
|
for (int i = 0; i < threadCount; i++) {
|
||||||
Thread thread = new ExecutorWorkerThread("Event Loop #" + i, this);
|
Thread thread = new ExecutorWorkerThread("Event Loop #" + i, this);
|
||||||
@@ -46,7 +44,7 @@ public class ResourceAwareExecutorService {
|
|||||||
|
|
||||||
public void stop() {
|
public void stop() {
|
||||||
if (executorThreads.size() == 0)
|
if (executorThreads.size() == 0)
|
||||||
throw new InvalidStateException("This executor service was not initialized yet.");
|
throw new RuntimeException("This executor service was not initialized yet.");
|
||||||
|
|
||||||
Iterator<Thread> iterator = executorThreads.iterator();
|
Iterator<Thread> iterator = executorThreads.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user