From 05de30f68960f96767c5ba677fbd22a393e8ee42 Mon Sep 17 00:00:00 2001 From: Shevchik Date: Wed, 9 Jul 2014 09:08:39 +0400 Subject: [PATCH] Init API using static method --- src/com/cnaude/chairs/api/ChairsAPI.java | 2 +- src/com/cnaude/chairs/core/Chairs.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/cnaude/chairs/api/ChairsAPI.java b/src/com/cnaude/chairs/api/ChairsAPI.java index 7b7af17..7c2abbf 100644 --- a/src/com/cnaude/chairs/api/ChairsAPI.java +++ b/src/com/cnaude/chairs/api/ChairsAPI.java @@ -7,7 +7,7 @@ import com.cnaude.chairs.core.PlayerSitData; public class ChairsAPI { private static PlayerSitData pdata; - public ChairsAPI(PlayerSitData pdata) { + public static void init(PlayerSitData pdata) { ChairsAPI.pdata = pdata; } diff --git a/src/com/cnaude/chairs/core/Chairs.java b/src/com/cnaude/chairs/core/Chairs.java index 294999e..3c81d85 100644 --- a/src/com/cnaude/chairs/core/Chairs.java +++ b/src/com/cnaude/chairs/core/Chairs.java @@ -83,7 +83,7 @@ public class Chairs extends JavaPlugin { getServer().getPluginManager().registerEvents(new TryUnsitEventListener(this), this); getServer().getPluginManager().registerEvents(new CommandRestrict(this), this); getCommand("chairs").setExecutor(new ChairsCommand(this, ignoreList)); - new ChairsAPI(getPlayerSitData()); + ChairsAPI.init(getPlayerSitData()); } @Override