mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Reduce complexity, similarly done to other cmds.
Removed "Hotloaded!" As that is also printed by the studio world's hotload function, now players are getting it twice.
This commit is contained in:
parent
ab0f544267
commit
c7ee183fe4
@ -21,6 +21,7 @@ package com.volmit.iris.core.command.studio;
|
|||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.IrisSettings;
|
import com.volmit.iris.core.IrisSettings;
|
||||||
import com.volmit.iris.core.tools.IrisWorlds;
|
import com.volmit.iris.core.tools.IrisWorlds;
|
||||||
|
import com.volmit.iris.engine.framework.IrisAccess;
|
||||||
import com.volmit.iris.util.collection.KList;
|
import com.volmit.iris.util.collection.KList;
|
||||||
import com.volmit.iris.util.plugin.MortarCommand;
|
import com.volmit.iris.util.plugin.MortarCommand;
|
||||||
import com.volmit.iris.util.plugin.VolmitSender;
|
import com.volmit.iris.util.plugin.VolmitSender;
|
||||||
@ -48,21 +49,26 @@ public class CommandIrisStudioHotload extends MortarCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sender.isPlayer()) {
|
if (!sender.isPlayer()) {
|
||||||
Player p = sender.player();
|
|
||||||
World world = p.getWorld();
|
|
||||||
if (!IrisWorlds.isIrisWorld(world)) {
|
|
||||||
sender.sendMessage("You must be in an iris world.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
IrisWorlds.access(world).hotload();
|
|
||||||
sender.sendMessage("Hotloaded!");
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
sender.sendMessage("Players only.");
|
sender.sendMessage("Players only.");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Player p = sender.player();
|
||||||
|
World world = p.getWorld();
|
||||||
|
|
||||||
|
if (!IrisWorlds.isIrisWorld(world)) {
|
||||||
|
sender.sendMessage("You must be in an iris world.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
IrisAccess worldAccess = IrisWorlds.access(world);
|
||||||
|
if (worldAccess == null){
|
||||||
|
sender.sendMessage("Could not gain access to the world you are in");
|
||||||
|
} else {
|
||||||
|
worldAccess.hotload();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user