Minor comment and formatting cleanup
This commit is contained in:
parent
336c3c4bfb
commit
f87ffc906c
13
README.md
13
README.md
@ -234,9 +234,8 @@ normal buttons cannot be used since they'd fall off. Using wall coral fans work
|
|||||||
`SHULKER_BOX` works too.
|
`SHULKER_BOX` works too.
|
||||||
|
|
||||||
Using `AIR` for a closed underwater gate looks weird, so `WATER` might be better. If using `AIR` for the closed gate,
|
Using `AIR` for a closed underwater gate looks weird, so `WATER` might be better. If using `AIR` for the closed gate,
|
||||||
you need to make sure it actually contains air when creating it.
|
you need to make sure it actually contains air when creating it. For partially submerged portals, like ones used for
|
||||||
For partially submerged portals, like ones used for boat teleportation, you need to keep water away
|
boat teleportation, you need to keep water away from the portal entrance/opening until it's been created.
|
||||||
from the portal entrance/opening until it's been created.
|
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
@ -279,8 +278,8 @@ It is possible to customize all the messages Stargate displays, including the [S
|
|||||||
strings in plugins/Stargate/lang/chosenLanguage.txt.
|
strings in plugins/Stargate/lang/chosenLanguage.txt.
|
||||||
|
|
||||||
If a string is removed, or left blank, it will default to the default english string. There are some special cases
|
If a string is removed, or left blank, it will default to the default english string. There are some special cases
|
||||||
regarding messages. When you see %variableName%, you need to keep this part in your string, as it will be replaced
|
regarding messages. When you see %variableName%, you need to keep this part in your string, as it will be replaced with
|
||||||
with relevant values.
|
relevant values.
|
||||||
|
|
||||||
The full list of strings is as follows:
|
The full list of strings is as follows:
|
||||||
|
|
||||||
@ -368,8 +367,8 @@ bungeeSign=Teleport to
|
|||||||
|
|
||||||
#### \[Version 0.8.0.0] PseudoKnight fork
|
#### \[Version 0.8.0.0] PseudoKnight fork
|
||||||
|
|
||||||
- Update for 1.13/1.14 compatibility. This update changes gate layouts to use new material names instead of numeric ids. You
|
- Update for 1.13/1.14 compatibility. This update changes gate layouts to use new material names instead of numeric ids.
|
||||||
need to update your gate layout configs.
|
You need to update your gate layout configs.
|
||||||
- Adds "verifyPortals" config option, which sets whether an old stargate's blocks are verified when loaded.
|
- Adds "verifyPortals" config option, which sets whether an old stargate's blocks are verified when loaded.
|
||||||
- Adds UUID support. (falls back to player names)
|
- Adds UUID support. (falls back to player names)
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ import java.util.Set;
|
|||||||
*/
|
*/
|
||||||
public class LanguageLoader {
|
public class LanguageLoader {
|
||||||
|
|
||||||
// Variables
|
|
||||||
private final String languageFolder;
|
private final String languageFolder;
|
||||||
private final Map<String, String> loadedBackupStrings;
|
private final Map<String, String> loadedBackupStrings;
|
||||||
private String chosenLanguage;
|
private String chosenLanguage;
|
||||||
|
@ -189,7 +189,9 @@ public class Stargate extends JavaPlugin {
|
|||||||
* @param error <p>Whether the message sent is an error</p>
|
* @param error <p>Whether the message sent is an error</p>
|
||||||
*/
|
*/
|
||||||
private static void sendMessage(CommandSender player, String message, boolean error) {
|
private static void sendMessage(CommandSender player, String message, boolean error) {
|
||||||
if (message.isEmpty()) return;
|
if (message.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
//Replace color codes with green? What's the deal with the dollar sign?
|
//Replace color codes with green? What's the deal with the dollar sign?
|
||||||
message = message.replaceAll("(&([a-f0-9]))", "\u00A7$2");
|
message = message.replaceAll("(&([a-f0-9]))", "\u00A7$2");
|
||||||
if (error) {
|
if (error) {
|
||||||
|
@ -6,6 +6,9 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.world.PortalCreateEvent;
|
import org.bukkit.event.world.PortalCreateEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Listens for and cancels relevant portal events
|
||||||
|
*/
|
||||||
public class PortalEventListener implements Listener {
|
public class PortalEventListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -13,6 +16,7 @@ public class PortalEventListener implements Listener {
|
|||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//Cancel nether portal creation when the portal is a StarGate portal
|
||||||
for (BlockState block : event.getBlocks()) {
|
for (BlockState block : event.getBlocks()) {
|
||||||
if (PortalHandler.getByBlock(block.getBlock()) != null) {
|
if (PortalHandler.getByBlock(block.getBlock()) != null) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package net.knarcraft.stargate.portal;
|
package net.knarcraft.stargate.portal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Each enum value represents one option a portal can have/use
|
||||||
|
*/
|
||||||
public enum PortalOption {
|
public enum PortalOption {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user