Pager#messageAsync and remove space in niced enum.
This commit is contained in:
parent
536919425b
commit
de4beb8be4
@ -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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
36
src/com/massivecraft/massivecore/ps/PSFormatArgument.java
Normal file
36
src/com/massivecraft/massivecore/ps/PSFormatArgument.java
Normal 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",
|
||||||
|
" ",
|
||||||
|
""
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -408,7 +408,7 @@ public class Txt
|
|||||||
{
|
{
|
||||||
parts.add(upperCaseFirst(part));
|
parts.add(upperCaseFirst(part));
|
||||||
}
|
}
|
||||||
return implode(parts, " ");
|
return implode(parts, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends Enum<T>> String getNicedEnum(T enumObject)
|
public static <T extends Enum<T>> String getNicedEnum(T enumObject)
|
||||||
|
Loading…
Reference in New Issue
Block a user