Made it so the game doesn't spam you when a familiar can't be called and just remains silent.

This commit is contained in:
Ceikry 2020-03-01 14:24:39 -06:00
parent 12c193f6f6
commit a231a5a0bc

View file

@ -536,11 +536,13 @@ public abstract class Familiar extends NPC implements Plugin<Object> {
/**
* Calls the familiar.
*/
//int spamTimer = 0;
public boolean call() {
Location destination = getSpawnLocation();
if (destination == null) {
owner.getPacketDispatch().sendMessage("Your familiar is too big to fit here. Try calling it again when you are standing");
owner.getPacketDispatch().sendMessage("somewhere with more space.");
if (destination == null && spamTimer == 0) {
//owner.getPacketDispatch().sendMessage("Your familiar is too big to fit here. Try calling it again when you are standing");
//owner.getPacketDispatch().sendMessage("somewhere with more space.");
//spamTimer = 50;
return false;
}
setInvisible(getZoneMonitor().isRestricted(ZoneRestriction.FOLLOWERS) && !owner.getLocks().isLocked("enable_summoning"));