mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-31 22:30:15 +00:00
SPIGOT-6496: /time functions affect entire server, not just the origin world
This commit is contained in:
parent
a1b1dc81a6
commit
aeaeb35931
1 changed files with 14 additions and 2 deletions
|
@ -12,7 +12,13 @@
|
|||
public class CommandTime {
|
||||
|
||||
public CommandTime() {}
|
||||
@@ -52,7 +57,13 @@
|
||||
@@ -47,12 +52,18 @@
|
||||
}
|
||||
|
||||
public static int setTime(CommandListenerWrapper commandlistenerwrapper, int i) {
|
||||
- Iterator iterator = commandlistenerwrapper.getServer().getAllLevels().iterator();
|
||||
+ Iterator iterator = com.google.common.collect.Iterators.singletonIterator(commandlistenerwrapper.getLevel()); // CraftBukkit - SPIGOT-6496: Only set the time for the world the command originates in
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
WorldServer worldserver = (WorldServer) iterator.next();
|
||||
|
||||
|
@ -27,7 +33,13 @@
|
|||
}
|
||||
|
||||
commandlistenerwrapper.sendSuccess(new ChatMessage("commands.time.set", new Object[]{i}), true);
|
||||
@@ -65,7 +76,13 @@
|
||||
@@ -60,12 +71,18 @@
|
||||
}
|
||||
|
||||
public static int addTime(CommandListenerWrapper commandlistenerwrapper, int i) {
|
||||
- Iterator iterator = commandlistenerwrapper.getServer().getAllLevels().iterator();
|
||||
+ Iterator iterator = com.google.common.collect.Iterators.singletonIterator(commandlistenerwrapper.getLevel()); // CraftBukkit - SPIGOT-6496: Only set the time for the world the command originates in
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
WorldServer worldserver = (WorldServer) iterator.next();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue