Pager#messageAsync and remove space in niced enum.

This commit is contained in:
Olof Larsson 2016-01-28 15:28:44 +01:00
parent 536919425b
commit de4beb8be4
3 changed files with 51 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package com.massivecraft.massivecore.pager; package com.massivecraft.massivecore.pager;
import com.massivecraft.massivecore.MassiveCore;
import com.massivecraft.massivecore.command.MassiveCommand; import com.massivecraft.massivecore.command.MassiveCommand;
import com.massivecraft.massivecore.mixin.Mixin; import com.massivecraft.massivecore.mixin.Mixin;
import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.mson.Mson;
@ -9,6 +10,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -267,4 +269,16 @@ public class Pager<T>
Mixin.messageOne(this.getSender(), messages); Mixin.messageOne(this.getSender(), messages);
} }
public void messageAsync()
{
Bukkit.getScheduler().runTaskAsynchronously(MassiveCore.get(), new Runnable()
{
@Override
public void run()
{
message();
}
});
}
} }

View File

@ -0,0 +1,36 @@
package com.massivecraft.massivecore.ps;
public class PSFormatArgument extends PSFormatAbstract
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static PSFormatArgument i = new PSFormatArgument();
public static PSFormatArgument get() { return i; }
private PSFormatArgument()
{
super(
"null",
"",
false,
false,
PS.NAME_SERIALIZED_WORLD + ":%s",
PS.NAME_SERIALIZED_BLOCKX + ":%+d",
PS.NAME_SERIALIZED_BLOCKY + ":%+d",
PS.NAME_SERIALIZED_BLOCKZ + ":%+d",
PS.NAME_SERIALIZED_LOCATIONX + ":%+.2f",
PS.NAME_SERIALIZED_LOCATIONY + ":%+.2f",
PS.NAME_SERIALIZED_LOCATIONZ + ":%+.2f",
PS.NAME_SERIALIZED_CHUNKX + ":%+d",
PS.NAME_SERIALIZED_CHUNKZ + ":%+d",
PS.NAME_SERIALIZED_PITCH + ":%.2f",
PS.NAME_SERIALIZED_YAW + ": %.2f",
PS.NAME_SERIALIZED_VELOCITYX + ":%+.2f",
PS.NAME_SERIALIZED_VELOCITYY + ":%+.2f",
PS.NAME_SERIALIZED_VELOCITYZ + ":%+.2f",
" ",
""
);
}
}