mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-19 14:57:35 +01:00
7f8af7b5b3
- Permissions 2/3 are no longer supported - Changed ChestShop.shop.create permission to consist of 2 different permissions: ChestShop.shop.create.buy and ChestShop.shop.create.sell - (Experimental) Ability to add max item prices to the config - (Experimental) Added a custom "chestshop" WorldGuard flag using reflection - Switched to new Config system - Updated Metrics - Removed chest masking option
29 lines
745 B
Java
29 lines
745 B
Java
package com.Acrobot.ChestShop.Utils;
|
|
|
|
import com.Acrobot.ChestShop.Config.ConfigObject;
|
|
import org.bukkit.configuration.file.YamlConfiguration;
|
|
|
|
import java.io.File;
|
|
|
|
/**
|
|
* @author Acrobot
|
|
*/
|
|
public class uLongName {
|
|
public static YamlConfiguration config;
|
|
public static File configFile;
|
|
|
|
public static String getName(final String shortName) {
|
|
return config.getString(shortName, shortName);
|
|
}
|
|
|
|
public static void saveName(String name) {
|
|
if (name.length() != 16) return;
|
|
config.set(name.substring(0, 15), name);
|
|
ConfigObject.reloadConfig(config, configFile);
|
|
}
|
|
|
|
public static String stripName(String name) {
|
|
return (name.length() > 15 ? name.substring(0, 15) : name);
|
|
}
|
|
}
|