Minor bug fixed preparing for 2.3
Fix chatPrefix -> chatprefix Fix portalcooldown -> teleportcooldown Fix made teleportcooldown show up in the config Add New warnings to the default.
This commit is contained in:
parent
950991ff1b
commit
3ac4e55dc2
|
@ -14,7 +14,7 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
|||
@Property
|
||||
private boolean enforceaccess;
|
||||
@Property
|
||||
private boolean prefixChat;
|
||||
private boolean prefixchat;
|
||||
@Property
|
||||
private boolean teleportintercept;
|
||||
@Property
|
||||
|
@ -30,7 +30,7 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
|||
@Property
|
||||
private String firstspawnworld;
|
||||
@Property
|
||||
private int portalcooldown;
|
||||
private int teleportcooldown;
|
||||
|
||||
public MultiverseCoreConfiguration() {
|
||||
super();
|
||||
|
@ -47,14 +47,14 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
|||
public void setDefaults() {
|
||||
// BEGIN CHECKSTYLE-SUPPRESSION: MagicNumberCheck
|
||||
enforceaccess = false;
|
||||
prefixChat = true;
|
||||
prefixchat = true;
|
||||
teleportintercept = true;
|
||||
firstspawnoverride = true;
|
||||
displaypermerrors = true;
|
||||
globaldebug = 0;
|
||||
messagecooldown = 5000;
|
||||
portalcooldown = 5000;
|
||||
this.version = 2.8;
|
||||
teleportcooldown = 1000;
|
||||
this.version = 2.9;
|
||||
// END CHECKSTYLE-SUPPRESSION: MagicNumberCheck
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
|||
*/
|
||||
@Override
|
||||
public boolean getPrefixChat() {
|
||||
return this.prefixChat;
|
||||
return this.prefixchat;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,7 +89,7 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
|||
*/
|
||||
@Override
|
||||
public void setPrefixChat(boolean prefixChat) {
|
||||
this.prefixChat = prefixChat;
|
||||
this.prefixchat = prefixChat;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -208,15 +208,15 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public int getPortalCooldown() {
|
||||
return this.portalcooldown;
|
||||
public int getTeleportCooldown() {
|
||||
return this.teleportcooldown;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void setPortalCooldown(int portalCooldown) {
|
||||
this.portalcooldown = portalCooldown;
|
||||
public void setTeleportCooldown(int teleportCooldown) {
|
||||
this.teleportcooldown = teleportCooldown;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,13 +18,13 @@ public interface MultiverseCoreConfig extends ConfigurationSerializable {
|
|||
* Sets portalCooldown.
|
||||
* @param portalCooldown The new value.
|
||||
*/
|
||||
void setPortalCooldown(int portalCooldown);
|
||||
void setTeleportCooldown(int portalCooldown);
|
||||
|
||||
/**
|
||||
* Gets portalCooldown.
|
||||
* @return portalCooldown.
|
||||
*/
|
||||
int getPortalCooldown();
|
||||
int getTeleportCooldown();
|
||||
|
||||
/**
|
||||
* Sets firstSpawnWorld.
|
||||
|
|
|
@ -55,7 +55,7 @@ public class VersionCommand extends MultiverseCommand {
|
|||
buffer.append("[Multiverse-Core] Dumping Config Values: (version ")
|
||||
.append(this.plugin.getMVConfig().getVersion()).append(")").append('\n');
|
||||
buffer.append("[Multiverse-Core] messagecooldown: ").append(plugin.getMessaging().getCooldown()).append('\n');
|
||||
buffer.append("[Multiverse-Core] teleportcooldown: ").append("Not yet IMPLEMENTED").append('\n');
|
||||
buffer.append("[Multiverse-Core] teleportcooldown: ").append(plugin.getMVConfig().getTeleportCooldown()).append('\n');
|
||||
buffer.append("[Multiverse-Core] worldnameprefix: ").append(plugin.getMVConfig().getPrefixChat()).append('\n');
|
||||
buffer.append("[Multiverse-Core] enforceaccess: ").append(plugin.getMVConfig().getEnforceAccess()).append('\n');
|
||||
buffer.append("[Multiverse-Core] displaypermerrors: ").append(plugin.getMVConfig().getDisplayPermErrors()).append('\n');
|
||||
|
|
|
@ -9,6 +9,7 @@ package com.onarandombox.MultiverseCore.utils;
|
|||
|
||||
import com.onarandombox.MultiverseCore.MultiverseCoreConfiguration;
|
||||
|
||||
import com.onarandombox.MultiverseCore.api.MultiverseCoreConfig;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -23,9 +24,9 @@ public class MVPlayerSession {
|
|||
private long teleportLast = 0L; // Timestamp for the Players last Portal Teleportation.
|
||||
private long messageLast = 0L; // Timestamp for the Players last Alert Message.
|
||||
|
||||
private MultiverseCoreConfiguration config; // Configuration file to find out Cooldown Timers.
|
||||
private MultiverseCoreConfig config; // Configuration file to find out Cooldown Timers.
|
||||
|
||||
public MVPlayerSession(Player player, MultiverseCoreConfiguration config) {
|
||||
public MVPlayerSession(Player player, MultiverseCoreConfig config) {
|
||||
this.player = player;
|
||||
this.config = config;
|
||||
// this.bedSpawn = null;
|
||||
|
@ -42,6 +43,6 @@ public class MVPlayerSession {
|
|||
*/
|
||||
public boolean getTeleportable() {
|
||||
long time = (new Date()).getTime();
|
||||
return ((time - this.teleportLast) > this.config.getPortalCooldown());
|
||||
return ((time - this.teleportLast) > this.config.getTeleportCooldown());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
# This is the MV2 Config. If you mess it up, copy the values out
|
||||
# delete it, and it will be regenerated. Then use the ingame interface
|
||||
# to add your values back via the "/mv conf" command.
|
||||
# When in-game, simply type: "/mv conf ?" for help.
|
||||
# A config with explanations can be found here:
|
||||
# https://github.com/Multiverse/Multiverse-Core/wiki/config.yml
|
||||
# ------------------------------------------------------------------------- #
|
||||
# This is the MV2 Config. If you mess it up, copy the values out #
|
||||
# delete it, and it will be regenerated. Then use the ingame interface #
|
||||
# to add your values back via the "/mv conf" command. #
|
||||
# When in-game, simply type: "/mv conf ?" for help. #
|
||||
# A config with explanations can be found here: #
|
||||
# https://github.com/Multiverse/Multiverse-Core/wiki/config.yml #
|
||||
# #
|
||||
# #
|
||||
# IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !!IMPORTANT #
|
||||
# #
|
||||
# Do NOT delete this line from your config!!!! #
|
||||
# ==: com.onarandombox.MultiverseCore.MultiverseCoreConfiguration #
|
||||
# #
|
||||
# IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !!IMPORTANT #
|
||||
# ------------------------------------------------------------------------- #
|
||||
|
|
Loading…
Reference in New Issue