mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-19 07:11:02 +00:00
Actually check for origin on command invoke
This commit is contained in:
@@ -23,10 +23,7 @@ import com.volmit.iris.core.IrisSettings;
|
|||||||
import com.volmit.iris.util.collection.KList;
|
import com.volmit.iris.util.collection.KList;
|
||||||
import com.volmit.iris.util.collection.KMap;
|
import com.volmit.iris.util.collection.KMap;
|
||||||
import com.volmit.iris.util.collection.KSet;
|
import com.volmit.iris.util.collection.KSet;
|
||||||
import com.volmit.iris.util.decree.DecreeContext;
|
import com.volmit.iris.util.decree.*;
|
||||||
import com.volmit.iris.util.decree.DecreeContextHandler;
|
|
||||||
import com.volmit.iris.util.decree.DecreeNode;
|
|
||||||
import com.volmit.iris.util.decree.DecreeParameter;
|
|
||||||
import com.volmit.iris.util.decree.annotations.Decree;
|
import com.volmit.iris.util.decree.annotations.Decree;
|
||||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||||
import com.volmit.iris.util.format.C;
|
import com.volmit.iris.util.format.C;
|
||||||
@@ -381,6 +378,12 @@ public class VirtualDecreeCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DecreeOrigin origin = type.getDeclaredAnnotation(Decree.class).origin();
|
||||||
|
if (origin.validFor(sender)) {
|
||||||
|
sender.sendMessage(C.RED + "This command has to be sent from another origin: " + C.GOLD + origin);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Iris.debug("@ " + getPath() + " with " + args.toString(", "));
|
Iris.debug("@ " + getPath() + " with " + args.toString(", "));
|
||||||
if (isNode()) {
|
if (isNode()) {
|
||||||
Iris.debug("Invoke " + getPath() + "(" + args.toString(",") + ") at ");
|
Iris.debug("Invoke " + getPath() + "(" + args.toString(",") + ") at ");
|
||||||
|
|||||||
Reference in New Issue
Block a user