9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-30 04:29:05 +00:00
This commit is contained in:
Daniel Mills
2020-08-01 09:57:42 -04:00
parent f3d87f09d7
commit d679660e8a
40 changed files with 134 additions and 113 deletions

View File

@@ -78,6 +78,21 @@ public class BlockDataTools
return null;
}
public static boolean isLit(BlockData mat)
{
return isLit(mat.getMaterial());
}
public static boolean isLit(Material mat)
{
if(mat.equals(Material.GLOWSTONE) || mat.equals(Material.TORCH) || mat.equals(Material.REDSTONE_TORCH) || mat.equals(Material.SOUL_TORCH) || mat.equals(Material.REDSTONE_WALL_TORCH) || mat.equals(Material.WALL_TORCH) || mat.equals(Material.SOUL_WALL_TORCH) || mat.equals(Material.LANTERN) || mat.equals(Material.JACK_O_LANTERN) || mat.equals(Material.REDSTONE_LAMP) || mat.equals(Material.MAGMA_BLOCK) || mat.equals(Material.SEA_LANTERN) || mat.equals(Material.SOUL_LANTERN) || mat.equals(Material.FIRE) || mat.equals(Material.SOUL_FIRE) || mat.equals(Material.SEA_PICKLE) || mat.equals(Material.BREWING_STAND) || mat.equals(Material.REDSTONE_ORE))
{
return true;
}
return false;
}
public static boolean canPlaceOnto(Material mat, Material onto)
{
if(onto.equals(Material.GRASS_BLOCK) && mat.equals(Material.DEAD_BUSH))

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import com.volmit.iris.Iris;

View File

@@ -1,6 +1,4 @@
package com.volmit.iris.command.util;
import com.volmit.iris.util.KList;
package com.volmit.iris.util;
/**
* Represents a pawn command

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import org.bukkit.event.Listener;

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;

View File

@@ -1,12 +1,10 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import org.bukkit.ChatColor;
import com.volmit.iris.util.KList;
/**
* Represents a pawn command
*

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -6,8 +6,6 @@ import java.lang.reflect.Modifier;
import org.bukkit.command.CommandSender;
import com.volmit.iris.util.KList;
public abstract class MortarPermission
{
private MortarPermission parent;

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import java.io.File;
import java.io.IOException;
@@ -22,11 +22,6 @@ import org.bukkit.permissions.PermissionDefault;
import org.bukkit.plugin.java.JavaPlugin;
import com.volmit.iris.Iris;
import com.volmit.iris.util.IO;
import com.volmit.iris.util.J;
import com.volmit.iris.util.KList;
import com.volmit.iris.util.KMap;
import com.volmit.iris.util.M;
public abstract class MortarPlugin extends JavaPlugin implements Listener
{
@@ -419,13 +414,13 @@ public abstract class MortarPlugin extends JavaPlugin implements Listener
for(Field i : getClass().getDeclaredFields())
{
if(i.isAnnotationPresent(com.volmit.iris.command.util.Command.class))
if(i.isAnnotationPresent(com.volmit.iris.util.Command.class))
{
try
{
i.setAccessible(true);
MortarCommand pc = (MortarCommand) i.getType().getConstructor().newInstance();
com.volmit.iris.command.util.Command c = i.getAnnotation(com.volmit.iris.command.util.Command.class);
com.volmit.iris.util.Command c = i.getAnnotation(com.volmit.iris.util.Command.class);
registerCommand(pc, c.value());
commandCache.add(pc);
v("Registered Commands /" + pc.getNode() + " (" + i.getName() + ")");

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import java.util.Set;

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;

View File

@@ -1,4 +1,4 @@
package com.volmit.iris.command.util;
package com.volmit.iris.util;
import java.lang.reflect.Field;
@@ -7,9 +7,6 @@ import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import com.volmit.iris.Iris;
import com.volmit.iris.util.KList;
import com.volmit.iris.util.KMap;
import com.volmit.iris.util.V;
/**
* Represents a virtual command. A chain of iterative processing through