2015-04-09 05:18:56 +02:00
|
|
|
From 35f81a7b124dd6c100f85509de4adb9cfcdfefcb Mon Sep 17 00:00:00 2001
|
2014-07-21 22:46:54 +02:00
|
|
|
From: FrozenBrain <carstenbamsti@googlemail.com>
|
|
|
|
Date: Sun, 2 Mar 2014 21:13:46 +0100
|
|
|
|
Subject: [PATCH] Use one PermissibleBase for all Command Blocks
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
|
|
|
|
index 1314c74..b339cf3 100644
|
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
|
|
|
|
@@ -12,9 +12,18 @@ import org.bukkit.plugin.Plugin;
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
public abstract class ServerCommandSender implements CommandSender {
|
|
|
|
- private final PermissibleBase perm = new PermissibleBase(this);
|
|
|
|
+ private static PermissibleBase blockPermInst;
|
|
|
|
+ private final PermissibleBase perm;
|
|
|
|
|
|
|
|
public ServerCommandSender() {
|
|
|
|
+ if (this instanceof CraftBlockCommandSender) {
|
|
|
|
+ if (blockPermInst == null) {
|
|
|
|
+ blockPermInst = new PermissibleBase(this);
|
|
|
|
+ }
|
|
|
|
+ this.perm = blockPermInst;
|
|
|
|
+ } else {
|
|
|
|
+ this.perm = new PermissibleBase(this);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isPermissionSet(String name) {
|
|
|
|
--
|
2014-11-28 02:17:45 +01:00
|
|
|
2.1.0
|
2014-07-21 22:46:54 +02:00
|
|
|
|