mirror of
https://github.com/TotalFreedomMC/TF-Marriage.git
synced 2025-02-05 14:22:45 +00:00
fix chat command
This commit is contained in:
parent
3cd0a1f979
commit
25fd25b795
4 changed files with 31 additions and 1 deletions
7
pom.xml
7
pom.xml
|
@ -49,6 +49,12 @@
|
|||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/spigot.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lenis0012.bukkit</groupId>
|
||||
<artifactId>lenisutils</artifactId>
|
||||
<version>1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lenis0012.updater</groupId>
|
||||
<artifactId>updater-api</artifactId>
|
||||
|
@ -204,6 +210,7 @@
|
|||
<artifactSet>
|
||||
<includes>
|
||||
<include>mkremins:fanciful</include>
|
||||
<include>com.lenis0012.bukkit:lenisutils</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
</configuration>
|
||||
|
|
|
@ -19,6 +19,8 @@ public class CommandChat extends Command {
|
|||
return;
|
||||
}
|
||||
|
||||
mPlayer.setInChat(true);
|
||||
boolean value = !mPlayer.isInChat();
|
||||
mPlayer.setInChat(value);
|
||||
reply(value ? Message.CHAT_ENABLED : Message.CHAT_DISABLED);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,8 @@ public enum Message {
|
|||
INSUFFICIENT_MONEY("&cYou have insufficient funds, costs %s"),
|
||||
PARTNER_FEE("&cYour partner couldn't pay the marriage fee!"),
|
||||
MARRIED_TO("&fmarried to %s"),
|
||||
CHAT_ENABLED("&aYou are now in marriage chat mode!"),
|
||||
CHAT_DISABLED("&aYou are no longer in marriage chat mode!"),
|
||||
|
||||
// WORDS
|
||||
STATUS("&aStatus: %s"),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.lenis0012.bukkit.marriage2.internal;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -9,6 +10,7 @@ import com.lenis0012.bukkit.marriage2.MData;
|
|||
import com.lenis0012.bukkit.marriage2.config.Permissions;
|
||||
import com.lenis0012.bukkit.marriage2.internal.Register.Type;
|
||||
import com.lenis0012.bukkit.marriage2.internal.data.DataConverter;
|
||||
import com.lenis0012.pluginutils.modules.configuration.Configuration;
|
||||
import com.lenis0012.updater.api.Updater;
|
||||
import com.lenis0012.updater.api.UpdaterFactory;
|
||||
import org.bukkit.Bukkit;
|
||||
|
@ -41,6 +43,23 @@ public class MarriageCore extends MarriageBase {
|
|||
Settings.reloadAll(this, true);
|
||||
Message.reloadAll(this);
|
||||
Permissions.setupChildRelations();
|
||||
|
||||
File file = new File("test.yml");
|
||||
Configuration config = new Configuration(file);
|
||||
if(file.exists()) {
|
||||
config.reload();
|
||||
config.set("settings.economy.currency", "dollars");
|
||||
} else {
|
||||
config.header("settings.economy", "Economy settings are in dollars.", "Enable to hook with vault");
|
||||
config.header("settings.x", "A value that decides how old you are");
|
||||
config.set("settings.economy.enabled", false);
|
||||
config.set("setting.economy.price", 50.0);
|
||||
config.set("settings.x", 15);
|
||||
config.set("settings.y", 33);
|
||||
config.set("settings.z", 12);
|
||||
}
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
@Register(name = "dependencies", type = Type.ENABLE, priority = 1)
|
||||
|
|
Loading…
Reference in a new issue