[BREAKING] Change up cell selection.

In the PrisonerManager you can now provide either AnyCell or NoCell and
it'll select a cell or not based upon the provided one. This is breaking
because it changes the required types in the methods and the new cells
don't have anything implemented and throw exceptions.
This commit is contained in:
graywolf336
2015-05-22 15:41:54 -05:00
parent 1f9035646d
commit 3eedc4904f
9 changed files with 249 additions and 53 deletions

View File

@@ -0,0 +1,74 @@
package com.graywolf336.jail.beans;
import java.util.HashSet;
import org.bukkit.Location;
import org.bukkit.block.Chest;
import com.graywolf336.jail.interfaces.ICell;
public class NoCell implements ICell {
public String getName() {
throw new UnsupportedOperationException();
}
public void setPrisoner(Prisoner prisoner) {
throw new UnsupportedOperationException();
}
public Prisoner getPrisoner() {
throw new UnsupportedOperationException();
}
public void removePrisoner() {
throw new UnsupportedOperationException();
}
public boolean hasPrisoner() {
throw new UnsupportedOperationException();
}
public void addAllSigns(HashSet<SimpleLocation> signs) {
throw new UnsupportedOperationException();
}
public void addSign(SimpleLocation sign) {
throw new UnsupportedOperationException();
}
public HashSet<SimpleLocation> getSigns() {
throw new UnsupportedOperationException();
}
public boolean hasSigns() {
throw new UnsupportedOperationException();
}
public String getSignString() {
throw new UnsupportedOperationException();
}
public void setTeleport(SimpleLocation location) {
throw new UnsupportedOperationException();
}
public Location getTeleport() {
throw new UnsupportedOperationException();
}
public void setChestLocation(SimpleLocation simpleLocation) {
throw new UnsupportedOperationException();
}
public Location getChestLocation() {
throw new UnsupportedOperationException();
}
public Chest getChest() {
throw new UnsupportedOperationException();
}
public boolean hasChest() {
throw new UnsupportedOperationException();
}
}