|
7 | 7 | import com.laytonsmith.PureUtilities.TermColors; |
8 | 8 | import com.laytonsmith.PureUtilities.Version; |
9 | 9 | import com.laytonsmith.PureUtilities.ZipReader; |
10 | | -import com.laytonsmith.abstraction.MCPlayer; |
11 | 10 | import com.laytonsmith.annotations.api; |
12 | 11 | import com.laytonsmith.annotations.hide; |
13 | 12 | import com.laytonsmith.annotations.noboilerplate; |
|
18 | 17 | import com.laytonsmith.core.ParseTree; |
19 | 18 | import com.laytonsmith.core.Security; |
20 | 19 | import com.laytonsmith.core.Static; |
21 | | -import com.laytonsmith.core.constructs.CBoolean; |
22 | 20 | import com.laytonsmith.core.compiler.analysis.StaticAnalysis; |
23 | 21 | import com.laytonsmith.core.constructs.CByteArray; |
24 | 22 | import com.laytonsmith.core.constructs.CDouble; |
|
36 | 34 | import com.laytonsmith.core.exceptions.CRE.CRECastException; |
37 | 35 | import com.laytonsmith.core.exceptions.CRE.CREIOException; |
38 | 36 | import com.laytonsmith.core.exceptions.CRE.CREIncludeException; |
39 | | -import com.laytonsmith.core.exceptions.CRE.CREPlayerOfflineException; |
40 | 37 | import com.laytonsmith.core.exceptions.CRE.CRESecurityException; |
41 | 38 | import com.laytonsmith.core.exceptions.CRE.CREThrowable; |
42 | 39 | import com.laytonsmith.core.exceptions.ConfigCompileException; |
@@ -124,124 +121,6 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi |
124 | 121 | } |
125 | 122 | } |
126 | 123 |
|
127 | | - @api(environments = {CommandHelperEnvironment.class}) |
128 | | - public static class raw_set_pvanish extends AbstractFunction { |
129 | | - |
130 | | - @Override |
131 | | - public String getName() { |
132 | | - return "raw_set_pvanish"; |
133 | | - } |
134 | | - |
135 | | - @Override |
136 | | - public Integer[] numArgs() { |
137 | | - return new Integer[]{2, 3}; |
138 | | - } |
139 | | - |
140 | | - @Override |
141 | | - public String docs() { |
142 | | - return "void {[player], isVanished, otherPlayer} Sets the visibility" |
143 | | - + " of the current player (or the one specified) to visible or invisible" |
144 | | - + " (based on the value of isVanished) from the view of the otherPlayer." |
145 | | - + " This is the raw access function, you probably shouldn't use this, as" |
146 | | - + " the CommandHelper vanish api functions will probably be easier to use."; |
147 | | - } |
148 | | - |
149 | | - @Override |
150 | | - public Class<? extends CREThrowable>[] thrown() { |
151 | | - return new Class[]{CREPlayerOfflineException.class}; |
152 | | - } |
153 | | - |
154 | | - @Override |
155 | | - public boolean isRestricted() { |
156 | | - return true; //lol, very |
157 | | - } |
158 | | - |
159 | | - @Override |
160 | | - public Boolean runAsync() { |
161 | | - return false; |
162 | | - } |
163 | | - |
164 | | - @Override |
165 | | - public Mixed exec(Target t, Environment environment, Mixed... args) throws ConfigRuntimeException { |
166 | | - MCPlayer me; |
167 | | - boolean isVanished; |
168 | | - MCPlayer other; |
169 | | - if(args.length == 2) { |
170 | | - me = environment.getEnv(CommandHelperEnvironment.class).GetPlayer(); |
171 | | - isVanished = ArgumentValidation.getBoolean(args[0], t); |
172 | | - other = Static.GetPlayer(args[1], t); |
173 | | - } else { |
174 | | - me = Static.GetPlayer(args[0], t); |
175 | | - isVanished = ArgumentValidation.getBoolean(args[1], t); |
176 | | - other = Static.GetPlayer(args[2], t); |
177 | | - } |
178 | | - |
179 | | - other.setVanished(isVanished, me); |
180 | | - |
181 | | - return CVoid.VOID; |
182 | | - } |
183 | | - |
184 | | - @Override |
185 | | - public MSVersion since() { |
186 | | - return MSVersion.V3_3_0; |
187 | | - } |
188 | | - } |
189 | | - |
190 | | - @api(environments = {CommandHelperEnvironment.class}) |
191 | | - public static class raw_pcan_see extends AbstractFunction { |
192 | | - |
193 | | - @Override |
194 | | - public String getName() { |
195 | | - return "raw_pcan_see"; |
196 | | - } |
197 | | - |
198 | | - @Override |
199 | | - public Integer[] numArgs() { |
200 | | - return new Integer[]{1, 2}; |
201 | | - } |
202 | | - |
203 | | - @Override |
204 | | - public String docs() { |
205 | | - return "boolean {[player], other} Returns a boolean stating if the other player can" |
206 | | - + " see this player or not. This is the raw access function, you probably shouldn't use this, as" |
207 | | - + " the CommandHelper vanish api functions will probably be easier to use."; |
208 | | - } |
209 | | - |
210 | | - @Override |
211 | | - public Class<? extends CREThrowable>[] thrown() { |
212 | | - return new Class[]{CREPlayerOfflineException.class}; |
213 | | - } |
214 | | - |
215 | | - @Override |
216 | | - public boolean isRestricted() { |
217 | | - return true; |
218 | | - } |
219 | | - |
220 | | - @Override |
221 | | - public Boolean runAsync() { |
222 | | - return false; |
223 | | - } |
224 | | - |
225 | | - @Override |
226 | | - public Mixed exec(Target t, Environment environment, Mixed... args) throws ConfigRuntimeException { |
227 | | - MCPlayer me; |
228 | | - MCPlayer other; |
229 | | - if(args.length == 1) { |
230 | | - me = environment.getEnv(CommandHelperEnvironment.class).GetPlayer(); |
231 | | - other = Static.GetPlayer(args[0], t); |
232 | | - } else { |
233 | | - me = Static.GetPlayer(args[0], t); |
234 | | - other = Static.GetPlayer(args[1], t); |
235 | | - } |
236 | | - return CBoolean.get(me.canSee(other)); |
237 | | - } |
238 | | - |
239 | | - @Override |
240 | | - public MSVersion since() { |
241 | | - return MSVersion.V3_3_0; |
242 | | - } |
243 | | - } |
244 | | - |
245 | 124 | private static String GenerateMooSaying(String text) { |
246 | 125 | String[] saying = text.split("\r\n|\n|\n\r"); |
247 | 126 | int longest = 0; |
|
0 commit comments