More generic spawn file path info.

This commit is contained in:
MobiusDevelopment
2022-08-15 21:42:33 +00:00
parent f8133c727c
commit 8e85def892
25 changed files with 25 additions and 25 deletions

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)

View File

@@ -117,7 +117,7 @@ public class NpcActionShift implements IActionShiftHandler
if (template != null)
{
final String fileName = template.getSpawnTemplate().getFile().getAbsolutePath().substring(Config.DATAPACK_ROOT.getAbsolutePath().length() + 1).replace('\\', '/');
html.replace("%spawnfile%", fileName);
html.replace("%spawnfile%", fileName.replace("data/spawns/", ""));
html.replace("%spawnname%", String.valueOf(template.getSpawnTemplate().getName())); // used String.valueOf because it can be null
html.replace("%spawngroup%", String.valueOf(template.getGroup().getName())); // used String.valueOf because it can be null
if (template.getSpawnTemplate().getAI() != null)