Permalink
Browse files

Change server_command sender type "type" -> "sendertype"

This is a change for the previous commit.
  • Loading branch information...
Pieter12345 committed Sep 28, 2018
1 parent 0d5b527 commit 2411a0e9327cf7c3611d417bd20a2a4a63096045
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/com/laytonsmith/core/events/drivers/ServerEvents.java
@@ -66,7 +66,7 @@ public String docs() {
+ " before CommandHelper aliases, allowing you to insert control beforehand. Be careful with this"
+ " event, because it can override ALL server commands, potentially creating all sorts of havoc."
+ "{command: The entire command | prefix: The prefix of the command"
+ " | type: The command sender type. This is one of: console, command_block,"
+ " | sendertype: The command sender type. This is one of: console, command_block,"
+ " command_minecart or null if the sender is unknown to CommandHelper.}"
+ "{command}"
+ "{}";
@@ -90,7 +90,7 @@ public boolean matches(Map<String, Construct> prefilter, BindableEvent e) throws
MCServerCommandEvent event = (MCServerCommandEvent) e;
String prefix = event.getCommand().split(" ", 2)[0];
Prefilters.match(prefilter, "prefix", prefix, PrefilterType.STRING_MATCH);
Prefilters.match(prefilter, "type",
Prefilters.match(prefilter, "sendertype",
getCommandsenderString(event.getCommandSender()), PrefilterType.STRING_MATCH);
return true;
}
@@ -113,7 +113,7 @@ public BindableEvent convert(CArray manualObject, Target t) {
// Set the command sender type.
String type = getCommandsenderString(event.getCommandSender());
map.put("type", (type == null ? CNull.NULL : new CString(type, Target.UNKNOWN)));
map.put("sendertype", (type == null ? CNull.NULL : new CString(type, Target.UNKNOWN)));
return map;
}

0 comments on commit 2411a0e

Please sign in to comment.