DiceFurniture 1.14 Update, sorry i forgot to switch the Spigot version

^^
This commit is contained in:
Ste3et_C0st 2019-07-13 20:15:26 +02:00
parent 2caf11da03
commit 8264f79a4e
5 changed files with 13 additions and 14 deletions

View File

@ -8,7 +8,9 @@ org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=1.8

View File

@ -87,13 +87,13 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.13-R0.1-SNAPSHOT</version> <version>1.14-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.13-R0.1-SNAPSHOT</version> <version>1.14-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>

View File

@ -9,8 +9,6 @@ import org.bukkit.block.BlockFace;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.entity.SpectralArrow;
import org.bukkit.entity.TippedArrow;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -61,10 +59,6 @@ public class Crossbow extends FurnitureHelper {
Arrow a = null; Arrow a = null;
if(mat.equals(Material.ARROW)){ if(mat.equals(Material.ARROW)){
a = (Arrow) getWorld().spawnEntity(start, EntityType.ARROW); a = (Arrow) getWorld().spawnEntity(start, EntityType.ARROW);
}else if(mat.equals(Material.SPECTRAL_ARROW)){
a = (SpectralArrow) getWorld().spawnEntity(start, EntityType.SPECTRAL_ARROW);
}else if(mat.equals(Material.TIPPED_ARROW)){
a = (TippedArrow) getWorld().spawnEntity(start, EntityType.TIPPED_ARROW);
} }
a.setCritical(true); a.setCritical(true);
a.setVelocity(v); a.setVelocity(v);

View File

@ -49,6 +49,7 @@ public class weaponStand extends Furniture implements Listener{
Player p = null; Player p = null;
Inventory inv = null; Inventory inv = null;
String title = "";
@Override @Override
public void onBreak(Player player) { public void onBreak(Player player) {
@ -107,7 +108,9 @@ public class weaponStand extends Furniture implements Listener{
is1.setItemMeta(im1); is1.setItemMeta(im1);
is3.setItemMeta(im3); is3.setItemMeta(im3);
inv = Bukkit.createInventory(null, 45, "§cWeaponBox"); this.title = "§cWeaponBox";
inv = Bukkit.createInventory(null, 45, this.title);
List<fEntity> asList = getManager().getfArmorStandByObjectID(getObjID()); List<fEntity> asList = getManager().getfArmorStandByObjectID(getObjID());
int j = 1; int j = 1;
@ -166,7 +169,7 @@ public class weaponStand extends Furniture implements Listener{
if(getObjID().getSQLAction().equals(SQLAction.REMOVE)){return;} if(getObjID().getSQLAction().equals(SQLAction.REMOVE)){return;}
if(p==null){return;} if(p==null){return;}
if(inv==null){return;} if(inv==null){return;}
if(!e.getInventory().getTitle().equalsIgnoreCase(inv.getTitle())){return;} if(!e.getView().getTitle().equalsIgnoreCase(this.title)){return;}
List<fEntity> asList = getManager().getfArmorStandByObjectID(getObjID()); List<fEntity> asList = getManager().getfArmorStandByObjectID(getObjID());
int j = 1; int j = 1;

View File

@ -42,8 +42,8 @@ public class graveStone extends FurnitureHelper{
Location sign = getLutil().getRelativ(kreutz2.getBlock().getLocation(), getBlockFace(), 0D, 1D); Location sign = getLutil().getRelativ(kreutz2.getBlock().getLocation(), getBlockFace(), 0D, 1D);
this.signLoc = sign; this.signLoc = sign;
if(!sign.getBlock().getType().equals(Material.WALL_SIGN)){ if(!sign.getBlock().getType().equals(Material.OAK_SIGN)){
sign.getBlock().setType(Material.WALL_SIGN); sign.getBlock().setType(Material.OAK_SIGN);
this.sign = sign.getBlock(); this.sign = sign.getBlock();
BlockState state = this.sign.getState(); BlockState state = this.sign.getState();
LocationUtil util = getLutil(); LocationUtil util = getLutil();
@ -146,14 +146,14 @@ public class graveStone extends FurnitureHelper{
} }
public String[] getText(){ public String[] getText(){
if(sign==null || !sign.getType().equals(Material.WALL_SIGN)){return null;} if(sign==null || !sign.getType().equals(Material.OAK_SIGN)){return null;}
Sign sign = (Sign) this.sign.getState(); Sign sign = (Sign) this.sign.getState();
return sign.getLines(); return sign.getLines();
} }
public void setText(Integer line, String text){ public void setText(Integer line, String text){
if(line==null || text == null){return;} if(line==null || text == null){return;}
if(sign==null || !sign.getType().equals(Material.WALL_SIGN)){return;} if(sign==null || !sign.getType().equals(Material.OAK_SIGN)){return;}
Sign sign = (Sign) this.sign.getState(); Sign sign = (Sign) this.sign.getState();
sign.setLine(line, text); sign.setLine(line, text);
sign.update(true, false); sign.update(true, false);