Fix incorrect event argument in UpdateRank

This commit is contained in:
AlexTheCoder 2017-07-05 18:15:05 -04:00 committed by cnr
parent f92eae067f
commit b314744b6d
3 changed files with 18 additions and 18 deletions

View File

@ -45,7 +45,7 @@ public class CoreClient
public UUID getUniqueId() public UUID getUniqueId()
{ {
return this._uuid; return _uuid;
} }
public String getName() public String getName()
@ -134,20 +134,20 @@ public class CoreClient
public void undisguise() public void undisguise()
{ {
this._disguisedName = null; _disguisedName = null;
this._disguisedSkin = null; _disguisedSkin = null;
this._disguisedRank = null; _disguisedRank = null;
this._disguisedUUID = null; _disguisedUUID = null;
} }
public String getDisguisedAs() public String getDisguisedAs()
{ {
return this._disguisedName; return _disguisedName;
} }
public String getDisguisedSkin() public String getDisguisedSkin()
{ {
return this._disguisedSkin; return _disguisedSkin;
} }
public Rank getDisguisedRank() public Rank getDisguisedRank()
@ -157,32 +157,32 @@ public class CoreClient
public UUID getDisguisedAsUUID() public UUID getDisguisedAsUUID()
{ {
return this._disguisedUUID; return _disguisedUUID;
} }
public boolean isDisguised() public boolean isDisguised()
{ {
if (this._disguisedName == null) if (_disguisedName == null)
{ {
return false; return false;
} }
return !this._name.equalsIgnoreCase(this._disguisedName); return !_name.equalsIgnoreCase(_disguisedName);
} }
public void disguise(String name, UUID uuid, Rank rank) public void disguise(String name, UUID uuid, Rank rank)
{ {
this._disguisedName = name; _disguisedName = name;
this._disguisedUUID = uuid; _disguisedUUID = uuid;
this._disguisedRank = rank; _disguisedRank = rank;
} }
public Rank getRealOrDisguisedRank() public Rank getRealOrDisguisedRank()
{ {
if (this._disguisedRank != null) if (_disguisedRank != null)
{ {
return this._disguisedRank; return _disguisedRank;
} }
return this.GetRank(); return GetRank();
} }
public void setNetworkSessionLoginTime(long loginTime) public void setNetworkSessionLoginTime(long loginTime)

View File

@ -92,7 +92,7 @@ public class UpdateRank extends CommandBase<CoreClientManager>
if (Plugin.Get(p).GetRank() != Plugin.Get(p).GetRank(true)) if (Plugin.Get(p).GetRank() != Plugin.Get(p).GetRank(true))
Plugin.Get(p).resetTemp(); Plugin.Get(p).resetTemp();
OnlineRankUpdateEvent event = new OnlineRankUpdateEvent(caller, Plugin.Get(caller).GetRank(), rank, true); OnlineRankUpdateEvent event = new OnlineRankUpdateEvent(caller, Plugin.Get(caller).GetRank(), rank, false);
Plugin.Get(p).SetRank(rank, false); Plugin.Get(p).SetRank(rank, false);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);

View File

@ -63,7 +63,7 @@ public abstract class CommandBase<PluginType extends MiniPlugin> implements ICom
public void setRequiredRank(Rank rank) public void setRequiredRank(Rank rank)
{ {
this._requiredRank = rank; _requiredRank = rank;
} }
public Rank[] GetSpecificRanks() public Rank[] GetSpecificRanks()